Resolve Lua language server diagnosed problems.
This commit is contained in:
committed by
abcdefg30
parent
3d0efa1cbe
commit
378f66a1ff
@@ -95,7 +95,7 @@ Tick = function()
|
||||
end
|
||||
|
||||
SetupWorld = function()
|
||||
Utils.Do(Nod.GetGroundAttackers(Nod), function(unit)
|
||||
Utils.Do(Nod.GetGroundAttackers(), function(unit)
|
||||
Trigger.OnKilled(unit, NodUnitKilled)
|
||||
end)
|
||||
|
||||
|
||||
@@ -103,7 +103,7 @@ AttackPlayer = function()
|
||||
|
||||
Utils.Do(NodBase, function(actor)
|
||||
Trigger.OnRemovedFromWorld(actor, function()
|
||||
Utils.Do(Nod.GetGroundAttackers(Nod), IdleHunt)
|
||||
Utils.Do(Nod.GetGroundAttackers(), IdleHunt)
|
||||
end)
|
||||
end)
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ WorldLoaded = function()
|
||||
InitObjectives(Nod)
|
||||
|
||||
GDIObjective = AddPrimaryObjective(GDI, "")
|
||||
BuildBase = AddPrimaryObjective(Nod, "build-base")
|
||||
BuildBaseObjective = AddPrimaryObjective(Nod, "build-base")
|
||||
DestroyGDI = AddPrimaryObjective(Nod, "destroy-gdi-units")
|
||||
|
||||
Utils.Do({ Refinery, Yard }, function(actor)
|
||||
@@ -97,7 +97,7 @@ Tick = function()
|
||||
Nod.MarkCompletedObjective(DestroyGDI)
|
||||
end
|
||||
|
||||
if DateTime.GameTime % DateTime.Seconds(1) == 0 and not Nod.IsObjectiveCompleted(BuildBase) and CheckForBase(Nod, NodBaseBuildings) then
|
||||
Nod.MarkCompletedObjective(BuildBase)
|
||||
if DateTime.GameTime % DateTime.Seconds(1) == 0 and not Nod.IsObjectiveCompleted(BuildBaseObjective) and CheckForBase(Nod, NodBaseBuildings) then
|
||||
Nod.MarkCompletedObjective(BuildBaseObjective)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -38,7 +38,7 @@ WorldLoaded = function()
|
||||
|
||||
InitObjectives(Nod)
|
||||
|
||||
BuildBase = AddPrimaryObjective(Nod, "build-base")
|
||||
BuildBaseObjective = AddPrimaryObjective(Nod, "build-base")
|
||||
DestroyGDI = AddPrimaryObjective(Nod, "destroy-gdi-base")
|
||||
GDIObjective = AddPrimaryObjective(GDI, "")
|
||||
|
||||
@@ -111,7 +111,7 @@ Tick = function()
|
||||
GDI.MarkCompletedObjective(GDIObjective)
|
||||
end
|
||||
|
||||
if DateTime.GameTime % DateTime.Seconds(1) == 0 and not Nod.IsObjectiveCompleted(BuildBase) and CheckForBase(Nod, NodBaseBuildings) then
|
||||
Nod.MarkCompletedObjective(BuildBase)
|
||||
if DateTime.GameTime % DateTime.Seconds(1) == 0 and not Nod.IsObjectiveCompleted(BuildBaseObjective) and CheckForBase(Nod, NodBaseBuildings) then
|
||||
Nod.MarkCompletedObjective(BuildBaseObjective)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -68,7 +68,7 @@ SendApcReinforcements = function()
|
||||
end
|
||||
end
|
||||
|
||||
CreateCivilians = function(actor, discoverer)
|
||||
CreateCivilians = function()
|
||||
Utils.Do(NodCiviliansActors, function(actor)
|
||||
actor.Owner = Nod
|
||||
end)
|
||||
@@ -96,7 +96,7 @@ WorldLoaded = function()
|
||||
|
||||
Trigger.OnAnyKilled(Atk6ActorTriggerActivator, function()
|
||||
Reinforcements.ReinforceWithTransport(GDI, "apc", Atk6Units, Atk6WaypointsPart1, Atk6WaypointsPart2,
|
||||
function(transport, cargo)
|
||||
function(_, cargo)
|
||||
Utils.Do(cargo, IdleHunt)
|
||||
end, IdleHunt)
|
||||
end)
|
||||
|
||||
@@ -47,7 +47,7 @@ SamSiteGoal = 3
|
||||
|
||||
CaptureStructures = function(actor)
|
||||
for i = 1, #WhitelistedStructures do
|
||||
structures = Nod.GetActorsByType(WhitelistedStructures[i])
|
||||
local structures = Nod.GetActorsByType(WhitelistedStructures[i])
|
||||
if #structures > 0 and not actor.IsDead and not structures[1].IsDead then
|
||||
actor.Capture(structures[1])
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user