reduce use of Map.Topleft and Map.Bottomright as requested in #8549

This commit is contained in:
clemty
2015-09-24 21:03:36 +02:00
parent bbdd597917
commit d4e1b1ba48
6 changed files with 49 additions and 60 deletions

View File

@@ -270,10 +270,8 @@ IdleHunt = function(unit)
end
CheckForSams = function(player)
local baseBuildings = Map.ActorsInBox(Map.TopLeft, Map.BottomRight, function(actor)
return actor.Owner == Nod and actor.Type == 'sam' end)
return #baseBuildings >= 3
local sams = Nod.GetActorsByType("sam")
return #sams >= 3
end
checkProduction = function(player)