Fix Sarin Gas Crackdown not ending after losing all units

This commit is contained in:
abcdefg30
2019-05-16 10:24:21 +02:00
committed by reaperrr
parent 3bc5b07277
commit 1364581696

View File

@@ -16,8 +16,8 @@ SovAttackStart2 = { StartRifle5, StartRifle6, StartGren }
RunAway = { IntroTruck2, StartRifle3, StartRifle4 } RunAway = { IntroTruck2, StartRifle3, StartRifle4 }
GreeceRifles = { GreeceRifle1, GreeceRifle2, GreeceRifle3, GreeceRifle4, GreeceRifle5 } GreeceRifles = { GreeceRifle1, GreeceRifle2, GreeceRifle3, GreeceRifle4, GreeceRifle5 }
CombatTeam1 = { "mnly", "spy", "spy", "mcv" } CombatTeam1 = { "mnly", "spy", "spy", "mcv" }
CombatTeam2 = CombatTeam2 =
{ {
easy = { "2tnk", "2tnk", "2tnk", "e3", "e3", "e3" }, easy = { "2tnk", "2tnk", "2tnk", "e3", "e3", "e3" },
normal = { "e3", "e3", "e3", "2tnk", "1tnk" }, normal = { "e3", "e3", "e3", "2tnk", "1tnk" },
hard = { "e3", "e3", "e3", "1tnk" } hard = { "e3", "e3", "e3", "1tnk" }
@@ -154,13 +154,17 @@ Tick = function()
if ussr.HasNoRequiredUnits() and badguy.HasNoRequiredUnits() then if ussr.HasNoRequiredUnits() and badguy.HasNoRequiredUnits() then
greece.MarkCompletedObjective(objKillAll) greece.MarkCompletedObjective(objKillAll)
end end
if greece.HasNoRequiredUnits() then
ussr.MarkCompletedObjective(ussrObj)
end
end end
WorldLoaded = function() WorldLoaded = function()
greece = Player.GetPlayer("Greece") greece = Player.GetPlayer("Greece")
ussr = Player.GetPlayer("USSR") ussr = Player.GetPlayer("USSR")
badguy = Player.GetPlayer("BadGuy") badguy = Player.GetPlayer("BadGuy")
Trigger.OnObjectiveAdded(greece, function(p, id) Trigger.OnObjectiveAdded(greece, function(p, id)
Media.DisplayMessage(p.GetObjectiveDescription(id), "New " .. string.lower(p.GetObjectiveType(id)) .. " objective") Media.DisplayMessage(p.GetObjectiveDescription(id), "New " .. string.lower(p.GetObjectiveType(id)) .. " objective")
end) end)