Remove now redundant Actor.IsDead checks from mission scripts
This commit is contained in:
@@ -43,10 +43,8 @@ end
|
||||
BuildNod1 = function()
|
||||
Production.BuildTeamFromTemplate(nod, Nod1Template, function(team)
|
||||
Team.Do(team, function(actor)
|
||||
if not Actor.IsDead(actor) then
|
||||
Actor.OnIdle(actor, Actor.Hunt)
|
||||
Actor.OnKilled(actor, KillCounter)
|
||||
end
|
||||
Actor.OnIdle(actor, Actor.Hunt)
|
||||
Actor.OnKilled(actor, KillCounter)
|
||||
end)
|
||||
Team.AddEventHandler(team.OnAllKilled, BuildNod1)
|
||||
end)
|
||||
@@ -55,10 +53,8 @@ end
|
||||
BuildAuto1 = function()
|
||||
Production.BuildTeamFromTemplate(nod, Auto1Template, function(team)
|
||||
Team.Do(team, function(actor)
|
||||
if not Actor.IsDead(actor) then
|
||||
Actor.OnIdle(actor, Actor.Hunt)
|
||||
Actor.OnKilled(actor, KillCounter)
|
||||
end
|
||||
Actor.OnIdle(actor, Actor.Hunt)
|
||||
Actor.OnKilled(actor, KillCounter)
|
||||
end)
|
||||
end)
|
||||
end
|
||||
|
||||
@@ -38,11 +38,7 @@ end
|
||||
|
||||
Build = function(template, repeats, func)
|
||||
Production.BuildTeamFromTemplate(nod, template, function(team)
|
||||
Team.Do(team, function(actor)
|
||||
if not Actor.IsDead(actor) then
|
||||
func(actor)
|
||||
end
|
||||
end)
|
||||
Team.Do(team, func)
|
||||
if repeats then
|
||||
Team.AddEventHandler(team.OnAllKilled, function()
|
||||
Build(template, repeats, func)
|
||||
|
||||
Reference in New Issue
Block a user