Code cleanup in the Tiberian Dawn Lua scripts.

Uppercase global variables.
Declare local variables.
Remove unused variable.
This commit is contained in:
Matthias Mailänder
2022-09-09 10:13:24 +02:00
committed by Gustas
parent ca45e02265
commit b8e261ff2f
18 changed files with 108 additions and 115 deletions

View File

@@ -119,8 +119,8 @@ SendReinforcementsWave = function(team)
end
Trigger.OnEnteredFootprint(AbandonedBaseTrigger, function(a, id)
if not abandonedBaseTrigger and a.Owner == Nod then
abandonedBaseTrigger = true
if not AbandonedBaseTriggered and a.Owner == Nod then
AbandonedBaseTriggered = true
Trigger.RemoveFootprintTrigger(id)
FlareCamera = Actor.Create("camera", true, { Owner = Nod, Location = waypoint25.Location })
@@ -141,8 +141,8 @@ Trigger.OnEnteredFootprint(AbandonedBaseTrigger, function(a, id)
end)
Trigger.OnEnteredFootprint(ReinforcementsTrigger, function(a, id)
if not reinforcementsTrigger and a.Owner == Nod and a.Type ~= "harv" then
reinforcementsTrigger = true
if not ReinforcementsTriggered and a.Owner == Nod and a.Type ~= "harv" then
ReinforcementsTriggered = true
Trigger.RemoveFootprintTrigger(id)
Trigger.AfterDelay(DateTime.Seconds(5), function()