Use global objective initialisation.

This commit is contained in:
Matthias Mailänder
2021-10-10 22:11:07 +02:00
committed by abcdefg30
parent d42edfc0b9
commit b9bfbfd5ac
53 changed files with 103 additions and 968 deletions

View File

@@ -386,29 +386,13 @@ WorldLoaded = function()
USSR = Player.GetPlayer("USSR")
GoodGuy = Player.GetPlayer("GoodGuy")
Trigger.OnObjectiveAdded(Greece, function(p, id)
Media.DisplayMessage(p.GetObjectiveDescription(id), "New " .. string.lower(p.GetObjectiveType(id)) .. " objective")
end)
InitObjectives(Greece)
USSRObj = USSR.AddObjective("Deny the Allies.")
MainObj = Greece.AddObjective("Rescue Tanya.")
KillAll = Greece.AddObjective("Eliminate all Soviet units in this area.")
InfWarfactory = Greece.AddObjective("Infiltrate the Soviet warfactory.", "Secondary", false)
Trigger.OnObjectiveCompleted(Greece, function(p, id)
Media.DisplayMessage(p.GetObjectiveDescription(id), "Objective completed")
end)
Trigger.OnObjectiveFailed(Greece, function(p, id)
Media.DisplayMessage(p.GetObjectiveDescription(id), "Objective failed")
end)
Trigger.OnPlayerLost(Greece, function()
Media.PlaySpeechNotification(Greece, "Lose")
end)
Trigger.OnPlayerWon(Greece, function()
Media.PlaySpeechNotification(Greece, "Win")
end)
InitTriggers()
SendSpy()
ChurchFootprint()