Move Utils.Seconds and .Minutes into DateTime global
Also renames Date.IsHalloween to DateTime.IsHalloween
This commit is contained in:
@@ -76,10 +76,10 @@ WorldLoaded = function()
|
||||
|
||||
SendNodPatrol()
|
||||
|
||||
Trigger.AfterDelay(Utils.Seconds(5), function() Reinforce(InfantryReinforcements) end)
|
||||
Trigger.AfterDelay(Utils.Seconds(15), function() Reinforce(InfantryReinforcements) end)
|
||||
Trigger.AfterDelay(Utils.Seconds(30), function() Reinforce(VehicleReinforcements) end)
|
||||
Trigger.AfterDelay(Utils.Seconds(60), function() Reinforce(VehicleReinforcements) end)
|
||||
Trigger.AfterDelay(DateTime.Seconds(5), function() Reinforce(InfantryReinforcements) end)
|
||||
Trigger.AfterDelay(DateTime.Seconds(15), function() Reinforce(InfantryReinforcements) end)
|
||||
Trigger.AfterDelay(DateTime.Seconds(30), function() Reinforce(VehicleReinforcements) end)
|
||||
Trigger.AfterDelay(DateTime.Seconds(60), function() Reinforce(VehicleReinforcements) end)
|
||||
end
|
||||
|
||||
tick = 0
|
||||
@@ -94,7 +94,7 @@ Tick = function()
|
||||
enemy.MarkCompletedObjective(nodObjective)
|
||||
end
|
||||
|
||||
if not baseEstablished and tick % Utils.Seconds(1) == 0 and CheckForBase() then
|
||||
if not baseEstablished and tick % DateTime.Seconds(1) == 0 and CheckForBase() then
|
||||
baseEstablished = true
|
||||
player.MarkCompletedObjective(gdiObjective2)
|
||||
end
|
||||
|
||||
@@ -12,9 +12,9 @@ end
|
||||
|
||||
BridgeheadSecured = function()
|
||||
Reinforce(MobileConstructionVehicle)
|
||||
Trigger.AfterDelay(Utils.Seconds(15), NodAttack)
|
||||
Trigger.AfterDelay(Utils.Seconds(30), function() Reinforce(EngineerReinforcements) end)
|
||||
Trigger.AfterDelay(Utils.Seconds(120), function() Reinforce(VehicleReinforcements) end)
|
||||
Trigger.AfterDelay(DateTime.Seconds(15), NodAttack)
|
||||
Trigger.AfterDelay(DateTime.Seconds(30), function() Reinforce(EngineerReinforcements) end)
|
||||
Trigger.AfterDelay(DateTime.Seconds(120), function() Reinforce(VehicleReinforcements) end)
|
||||
end
|
||||
|
||||
NodAttack = function()
|
||||
@@ -25,7 +25,7 @@ NodAttack = function()
|
||||
unit.AttackMove(waypoint2.Location)
|
||||
Trigger.OnIdle(unit, unit.Hunt)
|
||||
end)
|
||||
Trigger.OnAllKilled(attackers, function() Trigger.AfterDelay(Utils.Seconds(15), NodAttack) end)
|
||||
Trigger.OnAllKilled(attackers, function() Trigger.AfterDelay(DateTime.Seconds(15), NodAttack) end)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -45,14 +45,14 @@ WorldLoaded = function()
|
||||
|
||||
Trigger.OnPlayerWon(player, function()
|
||||
Media.PlaySpeechNotification(player, "Win")
|
||||
Trigger.AfterDelay(Utils.Seconds(1), function()
|
||||
Trigger.AfterDelay(DateTime.Seconds(1), function()
|
||||
Media.PlayMovieFullscreen("flag.vqa")
|
||||
end)
|
||||
end)
|
||||
|
||||
Trigger.OnPlayerLost(player, function()
|
||||
Media.PlaySpeechNotification(player, "Lose")
|
||||
Trigger.AfterDelay(Utils.Seconds(1), function()
|
||||
Trigger.AfterDelay(DateTime.Seconds(1), function()
|
||||
Media.PlayMovieFullscreen("gameover.vqa")
|
||||
end)
|
||||
end)
|
||||
|
||||
@@ -11,9 +11,9 @@ GDIReinforcements = { "e2", "e2", "e2", "e2", "e2" }
|
||||
GDIReinforcementsWaypoints = { GDIReinforcementsEntry.Location, GDIReinforcementsWP1.Location }
|
||||
|
||||
NodHelis = {
|
||||
{ Utils.Seconds(HeliDelay[1]), { NodHeliEntry.Location, NodHeliLZ1.Location }, { "e1", "e1", "e3" } },
|
||||
{ Utils.Seconds(HeliDelay[2]), { NodHeliEntry.Location, NodHeliLZ2.Location }, { "e1", "e1", "e1", "e1" } },
|
||||
{ Utils.Seconds(HeliDelay[3]), { NodHeliEntry.Location, NodHeliLZ3.Location }, { "e1", "e1", "e3" } }
|
||||
{ DateTime.Seconds(HeliDelay[1]), { NodHeliEntry.Location, NodHeliLZ1.Location }, { "e1", "e1", "e3" } },
|
||||
{ DateTime.Seconds(HeliDelay[2]), { NodHeliEntry.Location, NodHeliLZ2.Location }, { "e1", "e1", "e1", "e1" } },
|
||||
{ DateTime.Seconds(HeliDelay[3]), { NodHeliEntry.Location, NodHeliLZ3.Location }, { "e1", "e1", "e3" } }
|
||||
}
|
||||
|
||||
SendHeli = function(heli)
|
||||
@@ -30,7 +30,7 @@ SendGDIReinforcements = function()
|
||||
Media.PlaySpeechNotification(gdi, "Reinforce")
|
||||
Reinforcements.ReinforceWithTransport(gdi, "apc", GDIReinforcements, GDIReinforcementsWaypoints, nil, function(apc, team)
|
||||
table.insert(team, apc)
|
||||
Trigger.OnAllKilled(team, function() Trigger.AfterDelay(Utils.Seconds(5), SendGDIReinforcements) end)
|
||||
Trigger.OnAllKilled(team, function() Trigger.AfterDelay(DateTime.Seconds(5), SendGDIReinforcements) end)
|
||||
Utils.Do(team, function(unit) unit.Stance = "Defend" end)
|
||||
end)
|
||||
end
|
||||
@@ -49,7 +49,7 @@ BuildNod1 = function()
|
||||
end
|
||||
|
||||
if not HandOfNod.Build(Nod1Units, func) then
|
||||
Trigger.AfterDelay(Utils.Seconds(5), BuildNod1)
|
||||
Trigger.AfterDelay(DateTime.Seconds(5), BuildNod1)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -66,7 +66,7 @@ BuildAuto1 = function()
|
||||
end
|
||||
|
||||
if not HandOfNod.IsDead and HandOfNod.Build(Auto1Units, func) then
|
||||
Trigger.AfterDelay(Utils.Seconds(5), BuildAuto1)
|
||||
Trigger.AfterDelay(DateTime.Seconds(5), BuildAuto1)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -84,7 +84,7 @@ Tick = function()
|
||||
end
|
||||
|
||||
if gdi.HasNoRequiredUnits() then
|
||||
Trigger.AfterDelay(Utils.Seconds(1), function() gdi.MarkFailedObjective(gdiObjective) end)
|
||||
Trigger.AfterDelay(DateTime.Seconds(1), function() gdi.MarkFailedObjective(gdiObjective) end)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -121,14 +121,14 @@ WorldLoaded = function()
|
||||
|
||||
Trigger.OnPlayerWon(gdi, function()
|
||||
Media.PlaySpeechNotification(gdi, "Win")
|
||||
Trigger.AfterDelay(Utils.Seconds(1), function()
|
||||
Trigger.AfterDelay(DateTime.Seconds(1), function()
|
||||
Media.PlayMovieFullscreen("burdet1.vqa")
|
||||
end)
|
||||
end)
|
||||
|
||||
Trigger.OnPlayerLost(gdi, function()
|
||||
Media.PlaySpeechNotification(gdi, "Lose")
|
||||
Trigger.AfterDelay(Utils.Seconds(1), function()
|
||||
Trigger.AfterDelay(DateTime.Seconds(1), function()
|
||||
Media.PlayMovieFullscreen("gameover.vqa")
|
||||
end)
|
||||
end)
|
||||
|
||||
@@ -28,7 +28,7 @@ SendGDIReinforcements = function()
|
||||
Media.PlaySpeechNotification(gdi, "Reinforce")
|
||||
Reinforcements.ReinforceWithTransport(gdi, "apc", GDIReinforcements, GDIReinforcementsWaypoints, nil, function(apc, team)
|
||||
table.insert(team, apc)
|
||||
Trigger.OnAllKilled(team, function() Trigger.AfterDelay(Utils.Seconds(5), SendGDIReinforcements) end)
|
||||
Trigger.OnAllKilled(team, function() Trigger.AfterDelay(DateTime.Seconds(5), SendGDIReinforcements) end)
|
||||
Utils.Do(team, function(unit) unit.Stance = "Defend" end)
|
||||
end)
|
||||
end
|
||||
@@ -48,7 +48,7 @@ Build = function(unitTypes, repeats, func)
|
||||
end
|
||||
|
||||
if not HandOfNod.Build(unitTypes, innerFunc) then
|
||||
Trigger.AfterDelay(Utils.Seconds(5), function()
|
||||
Trigger.AfterDelay(DateTime.Seconds(5), function()
|
||||
Build(unitTypes, repeats, func)
|
||||
end)
|
||||
end
|
||||
@@ -90,7 +90,7 @@ Tick = function()
|
||||
end
|
||||
|
||||
if gdi.HasNoRequiredUnits() then
|
||||
Trigger.AfterDelay(Utils.Seconds(1), function()
|
||||
Trigger.AfterDelay(DateTime.Seconds(1), function()
|
||||
gdi.MarkFailedObjective(gdiObjective)
|
||||
end)
|
||||
end
|
||||
@@ -126,14 +126,14 @@ WorldLoaded = function()
|
||||
|
||||
Trigger.OnPlayerWon(gdi, function()
|
||||
Media.PlaySpeechNotification(gdi, "Win")
|
||||
Trigger.AfterDelay(Utils.Seconds(1), function()
|
||||
Trigger.AfterDelay(DateTime.Seconds(1), function()
|
||||
Media.PlayMovieFullscreen("burdet1.vqa")
|
||||
end)
|
||||
end)
|
||||
|
||||
Trigger.OnPlayerLost(gdi, function()
|
||||
Media.PlaySpeechNotification(gdi, "Lose")
|
||||
Trigger.AfterDelay(Utils.Seconds(1), function()
|
||||
Trigger.AfterDelay(DateTime.Seconds(1), function()
|
||||
Media.PlayMovieFullscreen("gameover.vqa")
|
||||
end)
|
||||
end)
|
||||
@@ -177,7 +177,7 @@ WorldLoaded = function()
|
||||
autoTrigger = true
|
||||
Trigger.RemoveFootprintTrigger(id)
|
||||
BuildAuto()
|
||||
Trigger.AfterDelay(Utils.Seconds(4), function()
|
||||
Trigger.AfterDelay(DateTime.Seconds(4), function()
|
||||
tank.Hunt()
|
||||
end)
|
||||
end
|
||||
|
||||
@@ -15,7 +15,7 @@ Civvie2Wpts = { waypoint26, waypoint3, waypoint9, waypoint4, waypoint5, waypoint
|
||||
FollowCivvieWpts = function(actor, wpts)
|
||||
Utils.Do(wpts, function(wpt)
|
||||
actor.Move(wpt.Location, 2)
|
||||
actor.Wait(Utils.Seconds(2))
|
||||
actor.Wait(DateTime.Seconds(2))
|
||||
end)
|
||||
end
|
||||
|
||||
@@ -36,22 +36,22 @@ TownAttackAction = function(actor)
|
||||
end
|
||||
|
||||
AttackTown = function()
|
||||
Reinforcements.Reinforce(nod, TownAttackWave1, { NodReinfEntry.Location, waypoint0.Location }, Utils.Seconds(0.25), TownAttackAction)
|
||||
Trigger.AfterDelay(Utils.Seconds(2), function()
|
||||
Reinforcements.Reinforce(nod, TownAttackWave2, { NodReinfEntry.Location, waypoint0.Location }, Utils.Seconds(1), TownAttackAction)
|
||||
Reinforcements.Reinforce(nod, TownAttackWave1, { NodReinfEntry.Location, waypoint0.Location }, DateTime.Seconds(0.25), TownAttackAction)
|
||||
Trigger.AfterDelay(DateTime.Seconds(2), function()
|
||||
Reinforcements.Reinforce(nod, TownAttackWave2, { NodReinfEntry.Location, waypoint0.Location }, DateTime.Seconds(1), TownAttackAction)
|
||||
end)
|
||||
Trigger.AfterDelay(Utils.Seconds(4), function()
|
||||
Reinforcements.Reinforce(nod, TownAttackWave3, { NodReinfEntry.Location, waypoint0.Location }, Utils.Seconds(1), TownAttackAction)
|
||||
Trigger.AfterDelay(DateTime.Seconds(4), function()
|
||||
Reinforcements.Reinforce(nod, TownAttackWave3, { NodReinfEntry.Location, waypoint0.Location }, DateTime.Seconds(1), TownAttackAction)
|
||||
end)
|
||||
end
|
||||
|
||||
SendGDIReinforcements = function()
|
||||
Reinforcements.Reinforce(player, GDIReinforcementsPart1, { GDIReinfEntry1.Location, waypoint12.Location }, Utils.Seconds(1), function(actor)
|
||||
Reinforcements.Reinforce(player, GDIReinforcementsPart1, { GDIReinfEntry1.Location, waypoint12.Location }, DateTime.Seconds(1), function(actor)
|
||||
Media.PlaySpeechNotification(player, "Reinforce")
|
||||
actor.Move(waypoint10.Location)
|
||||
actor.Stance = "Defend"
|
||||
end)
|
||||
Trigger.AfterDelay(Utils.Seconds(5), function()
|
||||
Trigger.AfterDelay(DateTime.Seconds(5), function()
|
||||
Reinforcements.ReinforceWithTransport(player, "apc", GDIReinforcementsPart2, { GDIReinfEntry2.Location, waypoint13.Location }, nil, function(apc, team)
|
||||
Media.PlaySpeechNotification(player, "Reinforce")
|
||||
apc.Move(GDIUnloadWpt.Location)
|
||||
@@ -81,14 +81,14 @@ WorldLoaded = function()
|
||||
|
||||
Trigger.OnPlayerWon(player, function()
|
||||
Media.PlaySpeechNotification(player, "Win")
|
||||
Trigger.AfterDelay(Utils.Seconds(1), function()
|
||||
Trigger.AfterDelay(DateTime.Seconds(1), function()
|
||||
Media.PlayMovieFullscreen("burdet1.vqa")
|
||||
end)
|
||||
end)
|
||||
|
||||
Trigger.OnPlayerLost(player, function()
|
||||
Media.PlaySpeechNotification(player, "Lose")
|
||||
Trigger.AfterDelay(Utils.Seconds(1), function()
|
||||
Trigger.AfterDelay(DateTime.Seconds(1), function()
|
||||
Media.PlayMovieFullscreen("gameover.vqa")
|
||||
end)
|
||||
end)
|
||||
|
||||
@@ -37,7 +37,7 @@ WorldLoaded = function()
|
||||
|
||||
Trigger.OnPlayerLost(nod, function()
|
||||
Media.PlaySpeechNotification(nod, "Lose")
|
||||
Trigger.AfterDelay(Utils.Seconds(1), function()
|
||||
Trigger.AfterDelay(DateTime.Seconds(1), function()
|
||||
Media.PlayMovieFullscreen("nodlose.vqa")
|
||||
end)
|
||||
end)
|
||||
@@ -49,13 +49,13 @@ WorldLoaded = function()
|
||||
|
||||
Trigger.OnKilled(Nikoomba, function()
|
||||
nod.MarkCompletedObjective(NodObjective1)
|
||||
Trigger.AfterDelay(Utils.Seconds(1), function()
|
||||
Trigger.AfterDelay(DateTime.Seconds(1), function()
|
||||
SendLastInfantryReinforcements()
|
||||
end)
|
||||
end)
|
||||
|
||||
Trigger.AfterDelay(Utils.Seconds(30), SendFirstInfantryReinforcements)
|
||||
Trigger.AfterDelay(Utils.Seconds(60), SendSecondInfantryReinforcements)
|
||||
Trigger.AfterDelay(DateTime.Seconds(30), SendFirstInfantryReinforcements)
|
||||
Trigger.AfterDelay(DateTime.Seconds(60), SendSecondInfantryReinforcements)
|
||||
end
|
||||
|
||||
Tick = function()
|
||||
|
||||
@@ -3,14 +3,14 @@ FirstAttackWave = { "e1", "e1", "e1", "e2", }
|
||||
SecondThirdAttackWave = { "e1", "e1", "e2", }
|
||||
|
||||
SendAttackWave = function(units, spawnPoint)
|
||||
Reinforcements.Reinforce(enemy, units, { spawnPoint }, Utils.Seconds(1), function(actor)
|
||||
Reinforcements.Reinforce(enemy, units, { spawnPoint }, DateTime.Seconds(1), function(actor)
|
||||
actor.AttackMove(PlayerBase.Location)
|
||||
end)
|
||||
end
|
||||
|
||||
InsertNodUnits = function()
|
||||
Reinforcements.Reinforce(player, NodUnits, { NodEntry.Location, NodRallyPoint.Location })
|
||||
Trigger.AfterDelay(Utils.Seconds(9), function()
|
||||
Trigger.AfterDelay(DateTime.Seconds(9), function()
|
||||
Reinforcements.Reinforce(player, { "mcv" }, { NodEntry.Location, PlayerBase.Location })
|
||||
end)
|
||||
end
|
||||
@@ -31,14 +31,14 @@ WorldLoaded = function()
|
||||
|
||||
Trigger.OnPlayerWon(player, function()
|
||||
Media.PlaySpeechNotification(player, "Win")
|
||||
Trigger.AfterDelay(Utils.Seconds(1), function()
|
||||
Trigger.AfterDelay(DateTime.Seconds(1), function()
|
||||
Media.PlayMovieFullscreen("desflees.vqa")
|
||||
end)
|
||||
end)
|
||||
|
||||
Trigger.OnPlayerLost(player, function()
|
||||
Media.PlaySpeechNotification(player, "Lose")
|
||||
Trigger.AfterDelay(Utils.Seconds(1), function()
|
||||
Trigger.AfterDelay(DateTime.Seconds(1), function()
|
||||
Media.PlayMovieFullscreen("flag.vqa")
|
||||
end)
|
||||
end)
|
||||
@@ -48,7 +48,7 @@ WorldLoaded = function()
|
||||
nodObjective2 = player.AddSecondaryObjective("Destroy all GDI forces")
|
||||
|
||||
Trigger.OnCapture(TechCenter, function()
|
||||
Trigger.AfterDelay(Utils.Seconds(2), function()
|
||||
Trigger.AfterDelay(DateTime.Seconds(2), function()
|
||||
player.MarkCompletedObjective(nodObjective1)
|
||||
end)
|
||||
end)
|
||||
@@ -58,9 +58,9 @@ WorldLoaded = function()
|
||||
end)
|
||||
|
||||
InsertNodUnits()
|
||||
Trigger.AfterDelay(Utils.Seconds(20), function() SendAttackWave(FirstAttackWave, AttackWaveSpawnA.Location) end)
|
||||
Trigger.AfterDelay(Utils.Seconds(50), function() SendAttackWave(SecondThirdAttackWave, AttackWaveSpawnB.Location) end)
|
||||
Trigger.AfterDelay(Utils.Seconds(100), function() SendAttackWave(SecondThirdAttackWave, AttackWaveSpawnC.Location) end)
|
||||
Trigger.AfterDelay(DateTime.Seconds(20), function() SendAttackWave(FirstAttackWave, AttackWaveSpawnA.Location) end)
|
||||
Trigger.AfterDelay(DateTime.Seconds(50), function() SendAttackWave(SecondThirdAttackWave, AttackWaveSpawnB.Location) end)
|
||||
Trigger.AfterDelay(DateTime.Seconds(100), function() SendAttackWave(SecondThirdAttackWave, AttackWaveSpawnC.Location) end)
|
||||
end
|
||||
|
||||
Tick = function()
|
||||
|
||||
@@ -26,7 +26,7 @@ end
|
||||
InsertNodUnits = function()
|
||||
Reinforcements.Reinforce(player, { "mcv" }, { McvEntry.Location, McvDeploy.Location })
|
||||
Reinforcements.Reinforce(player, NodUnits, { NodEntry.Location, NodRallypoint.Location })
|
||||
Trigger.AfterDelay(Utils.Seconds(15), function()
|
||||
Trigger.AfterDelay(DateTime.Seconds(15), function()
|
||||
Reinforcements.Reinforce(player, Engineers, { McvEntry.Location, PlayerBase.Location })
|
||||
end)
|
||||
end
|
||||
@@ -47,14 +47,14 @@ WorldLoaded = function()
|
||||
|
||||
Trigger.OnPlayerWon(player, function()
|
||||
Media.PlaySpeechNotification(player, "Win")
|
||||
Trigger.AfterDelay(Utils.Seconds(1), function()
|
||||
Trigger.AfterDelay(DateTime.Seconds(1), function()
|
||||
Media.PlayMovieFullscreen("desflees.vqa")
|
||||
end)
|
||||
end)
|
||||
|
||||
Trigger.OnPlayerLost(player, function()
|
||||
Media.PlaySpeechNotification(player, "Lose")
|
||||
Trigger.AfterDelay(Utils.Seconds(1), function()
|
||||
Trigger.AfterDelay(DateTime.Seconds(1), function()
|
||||
Media.PlayMovieFullscreen("flag.vqa")
|
||||
end)
|
||||
end)
|
||||
@@ -65,15 +65,15 @@ WorldLoaded = function()
|
||||
|
||||
Trigger.OnKilled(TechCenter, function() player.MarkFailedObjective(nodObjective1) end)
|
||||
Trigger.OnCapture(TechCenter, function()
|
||||
Trigger.AfterDelay(Utils.Seconds(2), function()
|
||||
Trigger.AfterDelay(DateTime.Seconds(2), function()
|
||||
player.MarkCompletedObjective(nodObjective1)
|
||||
end)
|
||||
end)
|
||||
|
||||
InsertNodUnits()
|
||||
Trigger.AfterDelay(Utils.Seconds(40), function() SendAttackWave(FirstAttackWaveUnits, FirstAttackWave) end)
|
||||
Trigger.AfterDelay(Utils.Seconds(80), function() SendAttackWave(SecondAttackWaveUnits, SecondAttackWave) end)
|
||||
Trigger.AfterDelay(Utils.Seconds(140), function() SendAttackWave(ThirdAttackWaveUnits, FirstAttackWave) end)
|
||||
Trigger.AfterDelay(DateTime.Seconds(40), function() SendAttackWave(FirstAttackWaveUnits, FirstAttackWave) end)
|
||||
Trigger.AfterDelay(DateTime.Seconds(80), function() SendAttackWave(SecondAttackWaveUnits, SecondAttackWave) end)
|
||||
Trigger.AfterDelay(DateTime.Seconds(140), function() SendAttackWave(ThirdAttackWaveUnits, FirstAttackWave) end)
|
||||
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user