Code cleanup in the Tiberian Dawn Lua scripts.
Uppercase global variables. Declare local variables. Remove unused variable.
This commit is contained in:
committed by
Gustas
parent
ca45e02265
commit
b8e261ff2f
@@ -68,10 +68,10 @@ CheckForHarvester = function()
|
||||
end
|
||||
|
||||
ProduceHarvester = function(building)
|
||||
if not buildingHarvester then
|
||||
buildingHarvester = true
|
||||
if not BuildingHarvester then
|
||||
BuildingHarvester = true
|
||||
building.Build(HarvesterProductionType, function()
|
||||
buildingHarvester = false
|
||||
BuildingHarvester = false
|
||||
end)
|
||||
end
|
||||
end
|
||||
@@ -139,23 +139,23 @@ Trigger.OnAllKilledOrCaptured(GDIBase, function()
|
||||
Utils.Do(GDI.GetGroundAttackers(), IdleHunt)
|
||||
end)
|
||||
|
||||
Trigger.OnKilled(GDIProc, function(building)
|
||||
Trigger.OnKilled(GDIProc, function()
|
||||
BuildBuilding(BaseProc, GDICYard)
|
||||
end)
|
||||
|
||||
Trigger.OnKilled(GDINuke1, function(building)
|
||||
Trigger.OnKilled(GDINuke1, function()
|
||||
BuildBuilding(BaseNuke1, GDICYard)
|
||||
end)
|
||||
|
||||
Trigger.OnKilled(GDINuke2, function(building)
|
||||
Trigger.OnKilled(GDINuke2, function()
|
||||
BuildBuilding(BaseNuke2, GDICYard)
|
||||
end)
|
||||
|
||||
Trigger.OnKilled(GDINuke3, function(building)
|
||||
Trigger.OnKilled(GDINuke3, function()
|
||||
BuildBuilding(BaseNuke3, GDICYard)
|
||||
end)
|
||||
|
||||
Trigger.OnKilled(GDIPyle, function(building)
|
||||
Trigger.OnKilled(GDIPyle, function()
|
||||
BuildBuilding(InfantryProduction, GDICYard)
|
||||
end)
|
||||
|
||||
|
||||
@@ -121,32 +121,32 @@ SendReinforcementsWave = function(team)
|
||||
end
|
||||
|
||||
Trigger.OnEnteredFootprint(Atk1, function(a, id)
|
||||
if not atk1Trigger and a.Owner == Nod then
|
||||
atk1Trigger = true
|
||||
if not Atk1Triggered and a.Owner == Nod then
|
||||
Atk1Triggered = true
|
||||
SendAttackWave(GDI5)
|
||||
Trigger.RemoveFootprintTrigger(id)
|
||||
end
|
||||
end)
|
||||
|
||||
Trigger.OnEnteredFootprint(Atk2, function(a, id)
|
||||
if not atk2Trigger and a.Owner == Nod then
|
||||
atk2Trigger = true
|
||||
if not Atk2Triggered and a.Owner == Nod then
|
||||
Atk2Triggered = true
|
||||
SendAttackWave(GDI4)
|
||||
Trigger.RemoveFootprintTrigger(id)
|
||||
end
|
||||
end)
|
||||
|
||||
Trigger.OnEnteredFootprint(Atk3, function(a, id)
|
||||
if not atk3Trigger and a.Owner == Nod then
|
||||
atk3Trigger = true
|
||||
if not Atk3Triggered and a.Owner == Nod then
|
||||
Atk3Triggered = true
|
||||
SendAttackWave(GDI6)
|
||||
Trigger.RemoveFootprintTrigger(id)
|
||||
end
|
||||
end)
|
||||
|
||||
Trigger.OnEnteredFootprint(Atk4, function(a, id)
|
||||
if not atk4Trigger and a.Owner == Nod then
|
||||
atk4Trigger = true
|
||||
if not Atk4Triggered and a.Owner == Nod then
|
||||
Atk4Triggered = true
|
||||
SendReinforcementsWave(GDI1)
|
||||
Trigger.RemoveFootprintTrigger(id)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user