Merge pull request #8243 from abcdefg30/capturecontrol
Fixed captured buildings producing bot controled units
This commit is contained in:
@@ -101,7 +101,7 @@ Atk5TriggerFunction = function()
|
|||||||
end
|
end
|
||||||
|
|
||||||
StartProduction = function(type)
|
StartProduction = function(type)
|
||||||
if Hand1.IsInWorld then
|
if Hand1.IsInWorld and Hand1.Owner == nod then
|
||||||
Hand1.Build(type)
|
Hand1.Build(type)
|
||||||
Trigger.AfterDelay(DateTime.Seconds(30), function() StartProduction(type) end)
|
Trigger.AfterDelay(DateTime.Seconds(30), function() StartProduction(type) end)
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -234,7 +234,7 @@ Tick = function()
|
|||||||
Nod.MarkCompletedObjective(NodObjective1)
|
Nod.MarkCompletedObjective(NodObjective1)
|
||||||
end
|
end
|
||||||
|
|
||||||
if DateTime.GameTime % DateTime.Seconds(3) == 0 and Barracks.IsInWorld then
|
if DateTime.GameTime % DateTime.Seconds(3) == 0 and Barracks.IsInWorld and Barracks.Owner == gdi then
|
||||||
checkProduction(GDI)
|
checkProduction(GDI)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -267,8 +267,8 @@ getStartUnits = function()
|
|||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
|
||||||
IdleHunt = function(unit)
|
IdleHunt = function(unit)
|
||||||
if not unit.IsDead then
|
if not unit.IsDead then
|
||||||
Trigger.OnIdle(unit, unit.Hunt)
|
Trigger.OnIdle(unit, unit.Hunt)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -152,7 +152,7 @@ Tick = function()
|
|||||||
Nod.MarkCompletedObjective(NodObjective1)
|
Nod.MarkCompletedObjective(NodObjective1)
|
||||||
end
|
end
|
||||||
|
|
||||||
if DateTime.GameTime % DateTime.Seconds(3) == 0 and Barracks.IsInWorld then
|
if DateTime.GameTime % DateTime.Seconds(3) == 0 and Barracks.IsInWorld and Barracks.Owner == gdi then
|
||||||
checkProduction(GDI)
|
checkProduction(GDI)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -234,8 +234,8 @@ InsertNodUnits = function()
|
|||||||
Reinforcements.Reinforce(Nod, { "mcv" }, { McvEntry.Location, McvRally.Location })
|
Reinforcements.Reinforce(Nod, { "mcv" }, { McvEntry.Location, McvRally.Location })
|
||||||
end
|
end
|
||||||
|
|
||||||
IdleHunt = function(unit)
|
IdleHunt = function(unit)
|
||||||
if not unit.IsDead then
|
if not unit.IsDead then
|
||||||
Trigger.OnIdle(unit, unit.Hunt)
|
Trigger.OnIdle(unit, unit.Hunt)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -295,9 +295,9 @@ checkProduction = function(player)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
if #UnitsType > 0 then
|
if #UnitsType > 0 then
|
||||||
if (type == 'jeep' or type == 'mtnk') and not Factory.IsDead then
|
if (type == 'jeep' or type == 'mtnk') and not Factory.IsDead and Factory.Owner == gdi then
|
||||||
Factory.Build(UnitsType)
|
Factory.Build(UnitsType)
|
||||||
elseif (type == 'e1' or type == 'e2') and not Barracks.IsDead then
|
elseif (type == 'e1' or type == 'e2') and not Barracks.IsDead and Barracks.Owner == gdi then
|
||||||
Barracks.Build(UnitsType)
|
Barracks.Build(UnitsType)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -2342,6 +2342,9 @@ Rules:
|
|||||||
SHOK:
|
SHOK:
|
||||||
Buildable:
|
Buildable:
|
||||||
Prerequisites: ~disabled
|
Prerequisites: ~disabled
|
||||||
|
HIJACKER:
|
||||||
|
Buildable:
|
||||||
|
Prerequisites: ~disabled
|
||||||
STNK:
|
STNK:
|
||||||
Buildable:
|
Buildable:
|
||||||
Prerequisites: ~disabled
|
Prerequisites: ~disabled
|
||||||
|
|||||||
Reference in New Issue
Block a user