Fix ai building in soviet04/06 missions despite killed construction yard
This commit is contained in:
@@ -23,12 +23,6 @@ BaseBuildings =
|
||||
}
|
||||
|
||||
BuildBase = function()
|
||||
if CYard.IsDead or CYard.Owner ~= Greece then
|
||||
return
|
||||
elseif Harvester.IsDead and Greece.Resources <= 299 then
|
||||
return
|
||||
end
|
||||
|
||||
for i,v in ipairs(BaseBuildings) do
|
||||
if not v.exists then
|
||||
BuildBuilding(v)
|
||||
@@ -41,6 +35,12 @@ end
|
||||
|
||||
BuildBuilding = function(building)
|
||||
Trigger.AfterDelay(Actor.BuildTime(building.type), function()
|
||||
if CYard.IsDead or CYard.Owner ~= Greece then
|
||||
return
|
||||
elseif Harvester.IsDead and Greece.Resources <= 299 then
|
||||
return
|
||||
end
|
||||
|
||||
local actor = Actor.Create(building.type, true, { Owner = Greece, Location = GreeceCYard.Location + building.pos })
|
||||
Greece.Cash = Greece.Cash - building.cost
|
||||
|
||||
|
||||
Reference in New Issue
Block a user