From 0d3c624bbcfdb79c6681a2bcfea05f0a3d773897 Mon Sep 17 00:00:00 2001 From: Smittytron Date: Sat, 27 Mar 2021 12:05:09 -0500 Subject: [PATCH] Standardize usage of AddObjective in RA missions --- mods/ra/maps/allies-01/allies01.lua | 10 +++---- mods/ra/maps/allies-02/allies02.lua | 8 +++--- mods/ra/maps/allies-03a/allies03a.lua | 10 +++---- mods/ra/maps/allies-03b/allies03b.lua | 10 +++---- mods/ra/maps/allies-04/allies04.lua | 4 +-- mods/ra/maps/allies-05a/allies05a.lua | 16 ++++++------ mods/ra/maps/allies-06a/allies06a.lua | 6 ++--- mods/ra/maps/allies-06b/allies06b.lua | 6 ++--- mods/ra/maps/allies-07/allies07.lua | 8 +++--- mods/ra/maps/allies-08a/allies08a.lua | 8 +++--- mods/ra/maps/allies-08b/allies08b.lua | 8 +++--- mods/ra/maps/ant-01/ant-01.lua | 4 +-- mods/ra/maps/evacuation/evacuation.lua | 16 ++++++------ mods/ra/maps/exodus/exodus.lua | 8 +++--- mods/ra/maps/infiltration/infiltration.lua | 6 ++--- mods/ra/maps/intervention/intervention.lua | 8 +++--- .../monster-tank-madness.lua | 26 +++++++++---------- .../maps/sarin-gas-1-crackdown/crackdown.lua | 8 +++--- .../maps/sarin-gas-2-down-under/downunder.lua | 10 +++---- mods/ra/maps/soviet-01/soviet01.lua | 2 +- mods/ra/maps/soviet-02a/soviet02a.lua | 4 +-- mods/ra/maps/soviet-02b/soviet02b.lua | 6 ++--- mods/ra/maps/soviet-03/soviet03.lua | 8 +++--- mods/ra/maps/soviet-04a/soviet04a.lua | 6 ++--- mods/ra/maps/soviet-04b/soviet04b.lua | 6 ++--- mods/ra/maps/soviet-05/soviet05.lua | 8 +++--- mods/ra/maps/soviet-06a/soviet06a.lua | 8 +++--- mods/ra/maps/soviet-06b/soviet06b.lua | 8 +++--- mods/ra/maps/soviet-07/soviet07.lua | 14 +++++----- .../soviet-soldier-volkov-n-chitzkoi.lua | 12 ++++----- mods/ra/maps/survival01/survival01.lua | 16 ++++++------ mods/ra/maps/survival02/survival02.lua | 10 +++---- .../maps/top-o-the-world/top-o-the-world.lua | 8 +++--- 33 files changed, 148 insertions(+), 148 deletions(-) diff --git a/mods/ra/maps/allies-01/allies01.lua b/mods/ra/maps/allies-01/allies01.lua index 296fa556cd..e5b51cab6a 100644 --- a/mods/ra/maps/allies-01/allies01.lua +++ b/mods/ra/maps/allies-01/allies01.lua @@ -135,7 +135,7 @@ CreateEinstein = function() einstein = Actor.Create(EinsteinType, true, { Location = EinsteinSpawnPoint.Location, Owner = player }) einstein.Scatter() Trigger.OnKilled(einstein, RescueFailed) - ExtractObjective = player.AddPrimaryObjective("Wait for the helicopter and extract Einstein.") + ExtractObjective = player.AddObjective("Wait for the helicopter and extract Einstein.") Trigger.AfterDelay(DateTime.Seconds(1), function() Media.PlaySpeechNotification(player, "TargetFreed") end) end @@ -193,10 +193,10 @@ WorldLoaded = function() Trigger.OnPlayerLost(player, MissionFailed) Trigger.OnPlayerWon(player, MissionAccomplished) - FindEinsteinObjective = player.AddPrimaryObjective("Find Einstein.") - TanyaSurviveObjective = player.AddPrimaryObjective("Tanya must survive.") - EinsteinSurviveObjective = player.AddPrimaryObjective("Einstein must survive.") - CivilProtectionObjective = player.AddSecondaryObjective("Protect all civilians.") + FindEinsteinObjective = player.AddObjective("Find Einstein.") + TanyaSurviveObjective = player.AddObjective("Tanya must survive.") + EinsteinSurviveObjective = player.AddObjective("Einstein must survive.") + CivilProtectionObjective = player.AddObjective("Protect all civilians.", "Secondary", false) RunInitialActivities() diff --git a/mods/ra/maps/allies-02/allies02.lua b/mods/ra/maps/allies-02/allies02.lua index 8ec987e88b..6a7273ecef 100644 --- a/mods/ra/maps/allies-02/allies02.lua +++ b/mods/ra/maps/allies-02/allies02.lua @@ -180,7 +180,7 @@ SendTrucks = function() DateTime.TimeLimit = 0 UserInterface.SetMissionText("") - ConvoyObjective = player.AddPrimaryObjective("Escort the convoy.") + ConvoyObjective = player.AddObjective("Escort the convoy.") Media.PlaySpeechNotification(player, "ConvoyApproaching") Trigger.AfterDelay(DateTime.Seconds(3), function() @@ -234,10 +234,10 @@ WorldLoaded = function() Media.PlaySpeechNotification(player, "MissionAccomplished") end) - ussrObj = ussr.AddPrimaryObjective("Deny the allies!") + ussrObj = ussr.AddObjective("Deny the allies!") - SecureObjective = player.AddPrimaryObjective("Secure the convoy's path.") - ConquestObjective = player.AddPrimaryObjective("Eliminate the entire soviet presence in this area.") + SecureObjective = player.AddObjective("Secure the convoy's path.") + ConquestObjective = player.AddObjective("Eliminate the entire soviet presence in this area.") Trigger.AfterDelay(DateTime.Seconds(1), function() Media.PlaySpeechNotification(allies, "MissionTimerInitialised") end) diff --git a/mods/ra/maps/allies-03a/allies03a.lua b/mods/ra/maps/allies-03a/allies03a.lua index 5fa3a4e4e3..850a10b463 100644 --- a/mods/ra/maps/allies-03a/allies03a.lua +++ b/mods/ra/maps/allies-03a/allies03a.lua @@ -119,11 +119,11 @@ InitObjectives = function() Media.DisplayMessage(p.GetObjectiveDescription(id), "New " .. string.lower(p.GetObjectiveType(id)) .. " objective") end) - KillBridges = player.AddPrimaryObjective("Destroy all bridges.") - TanyaSurvive = player.AddPrimaryObjective("Tanya must survive.") - KillUSSR = player.AddSecondaryObjective("Destroy all Soviet oil pumps.") - FreePrisoners = player.AddSecondaryObjective("Free all Allied soldiers and keep them alive.") - ussr.AddPrimaryObjective("Bridges must not be destroyed.") + KillBridges = player.AddObjective("Destroy all bridges.") + TanyaSurvive = player.AddObjective("Tanya must survive.") + KillUSSR = player.AddObjective("Destroy all Soviet oil pumps.", "Secondary", false) + FreePrisoners = player.AddObjective("Free all Allied soldiers and keep them alive.", "Secondary", false) + ussr.AddObjective("Bridges must not be destroyed.") Trigger.OnObjectiveCompleted(player, function(p, id) Media.DisplayMessage(p.GetObjectiveDescription(id), "Objective completed") diff --git a/mods/ra/maps/allies-03b/allies03b.lua b/mods/ra/maps/allies-03b/allies03b.lua index 69460ba801..226e78c0aa 100644 --- a/mods/ra/maps/allies-03b/allies03b.lua +++ b/mods/ra/maps/allies-03b/allies03b.lua @@ -183,11 +183,11 @@ InitObjectives = function() Media.DisplayMessage(p.GetObjectiveDescription(id), "New " .. string.lower(p.GetObjectiveType(id)) .. " objective") end) - KillBridges = player.AddPrimaryObjective("Destroy all bridges.") - TanyaSurvive = player.AddPrimaryObjective("Tanya must survive.") - FindAllies = player.AddSecondaryObjective("Find our lost tanks.") - FreePrisoners = player.AddSecondaryObjective("Free all Allied soldiers and keep them alive.") - ussr.AddPrimaryObjective("Bridges must not be destroyed.") + KillBridges = player.AddObjective("Destroy all bridges.") + TanyaSurvive = player.AddObjective("Tanya must survive.") + FindAllies = player.AddObjective("Find our lost tanks.", "Secondary", false) + FreePrisoners = player.AddObjective("Free all Allied soldiers and keep them alive.", "Secondary", false) + ussr.AddObjective("Bridges must not be destroyed.") Trigger.OnObjectiveCompleted(player, function(p, id) Media.DisplayMessage(p.GetObjectiveDescription(id), "Objective completed") diff --git a/mods/ra/maps/allies-04/allies04.lua b/mods/ra/maps/allies-04/allies04.lua index 5c31b755af..368c4f3ea2 100644 --- a/mods/ra/maps/allies-04/allies04.lua +++ b/mods/ra/maps/allies-04/allies04.lua @@ -143,8 +143,8 @@ InitObjectives = function() Media.DisplayMessage(p.GetObjectiveDescription(id), "New " .. string.lower(p.GetObjectiveType(id)) .. " objective") end) - KillUSSR = player.AddPrimaryObjective("Destroy all Soviet units and buildings in this region.") - DestroyConvoys = player.AddSecondaryObjective("Eliminate all passing Soviet convoys.") + KillUSSR = player.AddObjective("Destroy all Soviet units and buildings in this region.") + DestroyConvoys = player.AddObjective("Eliminate all passing Soviet convoys.", "Secondary", false) Trigger.OnObjectiveCompleted(player, function(p, id) Media.DisplayMessage(p.GetObjectiveDescription(id), "Objective completed") diff --git a/mods/ra/maps/allies-05a/allies05a.lua b/mods/ra/maps/allies-05a/allies05a.lua index 53f338d583..be6eb38d22 100644 --- a/mods/ra/maps/allies-05a/allies05a.lua +++ b/mods/ra/maps/allies-05a/allies05a.lua @@ -137,7 +137,7 @@ SendWaterExtraction = function() Camera.Position = flare.CenterPosition WaterExtractionTran = Reinforcements.ReinforceWithTransport(greece, ExtractionTransport, nil, SpyEntryPath)[1] - ExtractObj = greece.AddPrimaryObjective("Get all your forces into the transport.") + ExtractObj = greece.AddObjective("Get all your forces into the transport.") Trigger.OnKilled(WaterExtractionTran, function() ussr.MarkCompletedObjective(ussrObj) end) Trigger.OnAllRemovedFromWorld(greece.GetGroundAttackers(), function() @@ -192,13 +192,13 @@ FreeTanya = function() Trigger.OnKilled(Tanya, function() ussr.MarkCompletedObjective(ussrObj) end) if Map.LobbyOption("difficulty") == "tough" then - KillSams = greece.AddPrimaryObjective("Destroy all four SAM Sites that block\nour reinforcements' helicopter.") + KillSams = greece.AddObjective("Destroy all four SAM Sites that block\nour reinforcements' helicopter.") greece.MarkCompletedObjective(mainObj) - surviveObj = greece.AddPrimaryObjective("Tanya must not die!") + surviveObj = greece.AddObjective("Tanya must not die!") Media.PlaySpeechNotification(greece, "TanyaRescued") else - KillSams = greece.AddPrimaryObjective("Destroy all four SAM sites that block\nthe extraction helicopter.") + KillSams = greece.AddObjective("Destroy all four SAM sites that block\nthe extraction helicopter.") Media.PlaySpeechNotification(greece, "TargetFreed") end @@ -376,10 +376,10 @@ InitObjectives = function() Media.DisplayMessage(p.GetObjectiveDescription(id), "New " .. string.lower(p.GetObjectiveType(id)) .. " objective") end) - ussrObj = ussr.AddPrimaryObjective("Deny the Allies.") - mainObj = greece.AddPrimaryObjective("Rescue Tanya.") - KillAll = greece.AddPrimaryObjective("Eliminate all Soviet units in this area.") - infWarfactory = greece.AddSecondaryObjective("Infiltrate the Soviet warfactory.") + 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") diff --git a/mods/ra/maps/allies-06a/allies06a.lua b/mods/ra/maps/allies-06a/allies06a.lua index dbd542050b..7cf205af69 100644 --- a/mods/ra/maps/allies-06a/allies06a.lua +++ b/mods/ra/maps/allies-06a/allies06a.lua @@ -141,7 +141,7 @@ InfiltrateTechCenter = function() return end infiltrated = true - DestroySovietsObj = player.AddPrimaryObjective("Destroy all Soviet buildings and units in the area.") + DestroySovietsObj = player.AddObjective("Destroy all Soviet buildings and units in the area.") player.MarkCompletedObjective(InfiltrateTechCenterObj) local Proxy = Actor.Create("powerproxy.paratroopers", false, { Owner = ussr }) @@ -198,8 +198,8 @@ WorldLoaded = function() Media.PlaySpeechNotification(player, "MissionAccomplished") end) - InfiltrateTechCenterObj = player.AddPrimaryObjective("Infiltrate one of the Soviet tech centers with a spy.") - CaptureRadarDomeObj = player.AddSecondaryObjective("Capture the Radar Dome at the shore.") + InfiltrateTechCenterObj = player.AddObjective("Infiltrate one of the Soviet tech centers with a spy.") + CaptureRadarDomeObj = player.AddObjective("Capture the Radar Dome at the shore.", "Secondary", false) Camera.Position = DefaultCameraPosition.CenterPosition diff --git a/mods/ra/maps/allies-06b/allies06b.lua b/mods/ra/maps/allies-06b/allies06b.lua index ee5c5da10d..b4ec0584f5 100644 --- a/mods/ra/maps/allies-06b/allies06b.lua +++ b/mods/ra/maps/allies-06b/allies06b.lua @@ -151,7 +151,7 @@ InfiltrateTechCenter = function() return end infiltrated = true - DestroySovietsObj = player.AddPrimaryObjective("Destroy all Soviet buildings and units in the area.") + DestroySovietsObj = player.AddObjective("Destroy all Soviet buildings and units in the area.") player.MarkCompletedObjective(InfiltrateTechCenterObj) end) @@ -202,8 +202,8 @@ WorldLoaded = function() Media.PlaySpeechNotification(player, "MissionAccomplished") end) - InfiltrateTechCenterObj = player.AddPrimaryObjective("Infiltrate one of the Soviet tech centers with a spy.") - CaptureRadarDomeObj = player.AddSecondaryObjective("Capture the Radar Dome at the shore.") + InfiltrateTechCenterObj = player.AddObjective("Infiltrate one of the Soviet tech centers with a spy.") + CaptureRadarDomeObj = player.AddObjective("Capture the Radar Dome at the shore.", "Secondary", false) Camera.Position = DefaultCameraPosition.CenterPosition diff --git a/mods/ra/maps/allies-07/allies07.lua b/mods/ra/maps/allies-07/allies07.lua index 1dfa05012d..c6fe9be6b4 100644 --- a/mods/ra/maps/allies-07/allies07.lua +++ b/mods/ra/maps/allies-07/allies07.lua @@ -185,10 +185,10 @@ WorldLoaded = function() Camera.Position = DefaultCameraPosition.CenterPosition - CaptureRadarDomeObj = greece.AddPrimaryObjective("Capture the Radar Dome.") - DestroySubPens = greece.AddPrimaryObjective("Destroy all Soviet Sub Pens") - ClearSubActivity = greece.AddSecondaryObjective("Clear the area of all sub activity") - BeatAllies = ussr.AddPrimaryObjective("Defeat the Allied forces.") + CaptureRadarDomeObj = greece.AddObjective("Capture the Radar Dome.") + DestroySubPens = greece.AddObjective("Destroy all Soviet Sub Pens") + ClearSubActivity = greece.AddObjective("Clear the area of all sub activity", "Secondary", false) + BeatAllies = ussr.AddObjective("Defeat the Allied forces.") Trigger.OnObjectiveCompleted(greece, function(p, id) Media.DisplayMessage(p.GetObjectiveDescription(id), "Objective completed") diff --git a/mods/ra/maps/allies-08a/allies08a.lua b/mods/ra/maps/allies-08a/allies08a.lua index 0121f4b681..834f24e394 100644 --- a/mods/ra/maps/allies-08a/allies08a.lua +++ b/mods/ra/maps/allies-08a/allies08a.lua @@ -119,10 +119,10 @@ WorldLoaded = function() ussr = Player.GetPlayer("USSR") germany = Player.GetPlayer("Germany") - DefendChronosphere = greece.AddPrimaryObjective("Defend the Chronosphere and the Tech Center\nat all costs.") - KeepBasePowered = greece.AddPrimaryObjective("The Chronosphere must have power when the\ntimer runs out.") - EvacuateScientists = greece.AddSecondaryObjective("Evacuate all scientists from the island to\nthe west.") - BeatAllies = ussr.AddPrimaryObjective("Defeat the Allied forces.") + DefendChronosphere = greece.AddObjective("Defend the Chronosphere and the Tech Center\nat all costs.") + KeepBasePowered = greece.AddObjective("The Chronosphere must have power when the\ntimer runs out.") + EvacuateScientists = greece.AddObjective("Evacuate all scientists from the island to\nthe west.", "Secondary", false) + BeatAllies = ussr.AddObjective("Defeat the Allied forces.") Trigger.OnObjectiveCompleted(greece, function(p, id) Media.DisplayMessage(p.GetObjectiveDescription(id), "Objective completed") diff --git a/mods/ra/maps/allies-08b/allies08b.lua b/mods/ra/maps/allies-08b/allies08b.lua index d3c4f72e38..0e7c21538d 100644 --- a/mods/ra/maps/allies-08b/allies08b.lua +++ b/mods/ra/maps/allies-08b/allies08b.lua @@ -119,10 +119,10 @@ WorldLoaded = function() ussr = Player.GetPlayer("USSR") england = Player.GetPlayer("England") - DefendChronosphere = greece.AddPrimaryObjective("Defend the Chronosphere and the Tech Center\nat all costs.") - KeepBasePowered = greece.AddPrimaryObjective("The Chronosphere must have power when the\ntimer runs out.") - EvacuateScientists = greece.AddSecondaryObjective("Evacuate all scientists from the island to\nthe east.") - BeatAllies = ussr.AddPrimaryObjective("Defeat the Allied forces.") + DefendChronosphere = greece.AddObjective("Defend the Chronosphere and the Tech Center\nat all costs.") + KeepBasePowered = greece.AddObjective("The Chronosphere must have power when the\ntimer runs out.") + EvacuateScientists = greece.AddObjective("Evacuate all scientists from the island to\nthe east.", "Secondary", false) + BeatAllies = ussr.AddObjective("Defeat the Allied forces.") Trigger.OnObjectiveCompleted(greece, function(p, id) Media.DisplayMessage(p.GetObjectiveDescription(id), "Objective completed") diff --git a/mods/ra/maps/ant-01/ant-01.lua b/mods/ra/maps/ant-01/ant-01.lua index f7c992d264..4a3ce164b1 100644 --- a/mods/ra/maps/ant-01/ant-01.lua +++ b/mods/ra/maps/ant-01/ant-01.lua @@ -60,7 +60,7 @@ DiscoveredAlliedBase = function(actor, discoverer) --Need to delay this so we don't fail mission before obj added Trigger.AfterDelay(DateTime.Seconds(1), function() - SurviveObjective = allies.AddPrimaryObjective("Defend outpost until reinforcements arrive.") + SurviveObjective = allies.AddObjective("Defend outpost until reinforcements arrive.") SetupTimeNotifications() Trigger.OnAllRemovedFromWorld(AlliedBase, function() allies.MarkFailedObjective(SurviveObjective) @@ -145,7 +145,7 @@ InitObjectives = function() Media.DisplayMessage(p.GetObjectiveDescription(id), "New " .. string.lower(p.GetObjectiveType(id)) .. " objective") end) - DiscoverObjective = allies.AddPrimaryObjective("Find the outpost.") + DiscoverObjective = allies.AddObjective("Find the outpost.") Utils.Do(AlliedBase, function(actor) Trigger.OnEnteredProximityTrigger(actor.CenterPosition, WDist.FromCells(8), function(discoverer, id) diff --git a/mods/ra/maps/evacuation/evacuation.lua b/mods/ra/maps/evacuation/evacuation.lua index 44d0415f5a..d5015d3d79 100644 --- a/mods/ra/maps/evacuation/evacuation.lua +++ b/mods/ra/maps/evacuation/evacuation.lua @@ -242,7 +242,7 @@ SetupTriggers = function() Trigger.OnAllKilledOrCaptured(Sams, function() allies1.MarkCompletedObjective(objDestroySamSites) - objExtractEinstein = allies1.AddPrimaryObjective("Wait for a helicopter at the LZ and extract Einstein.") + objExtractEinstein = allies1.AddObjective("Wait for a helicopter at the LZ and extract Einstein.") Actor.Create("flare", true, { Owner = allies1, Location = ExtractionLZ.Location + CVec.New(1, -1) }) Beacon.New(allies1, ExtractionLZ.CenterPosition) Media.PlaySpeechNotification(allies1, "SignalFlareNorth") @@ -271,7 +271,7 @@ SetupTriggers = function() ReassignActors(TownUnits, neutral, allies1) Utils.Do(TownUnits, function(a) a.Stance = "Defend" end) allies1.MarkCompletedObjective(objFindEinstein) - objEinsteinSurvival = allies1.AddPrimaryObjective("Keep Einstein alive at all costs.") + objEinsteinSurvival = allies1.AddObjective("Keep Einstein alive at all costs.") Trigger.OnKilled(Einstein, function() allies1.MarkFailedObjective(objEinsteinSurvival) end) @@ -365,13 +365,13 @@ WorldLoaded = function() ReassignActors(Map.ActorsInWorld, allies, allies2) SpawnTanya() - objTanyaMustSurvive = allies1.AddPrimaryObjective("Tanya must survive.") - objFindEinstein = allies1.AddPrimaryObjective("Find Einstein's crashed helicopter.") - objDestroySamSites = allies1.AddPrimaryObjective("Destroy the SAM sites.") + objTanyaMustSurvive = allies1.AddObjective("Tanya must survive.") + objFindEinstein = allies1.AddObjective("Find Einstein's crashed helicopter.") + objDestroySamSites = allies1.AddObjective("Destroy the SAM sites.") - objHoldPosition = allies2.AddPrimaryObjective("Hold your position and protect the base.") - objLimitLosses = allies2.AddSecondaryObjective("Do not lose more than " .. DeathThreshold[Map.LobbyOption("difficulty")] .. " units.") - objCutSovietPower = allies2.AddSecondaryObjective("Take out the Soviet power grid.") + objHoldPosition = allies2.AddObjective("Hold your position and protect the base.") + objLimitLosses = allies2.AddObjective("Do not lose more than " .. DeathThreshold[Map.LobbyOption("difficulty")] .. " units.", "Secondary", false) + objCutSovietPower = allies2.AddObjective("Take out the Soviet power grid.", "Secondary", false) SetupTriggers() SetupSoviets() diff --git a/mods/ra/maps/exodus/exodus.lua b/mods/ra/maps/exodus/exodus.lua index afc9c54d9b..d8511fc7b3 100644 --- a/mods/ra/maps/exodus/exodus.lua +++ b/mods/ra/maps/exodus/exodus.lua @@ -331,9 +331,9 @@ WorldLoaded = function() UserInterface.SetMissionText(UnitsEvacuated .. "/" .. unitsEvacuatedThreshold .. " units evacuated.", TextColor) Utils.Do(humans, function(player) if player then - evacuateUnits = player.AddPrimaryObjective("Evacuate " .. unitsEvacuatedThreshold .. " units.") - destroyAirbases = player.AddSecondaryObjective("Destroy the nearby Soviet airbases.") - evacuateMgg = player.AddSecondaryObjective("Evacuate at least one mobile gap generator.") + evacuateUnits = player.AddObjective("Evacuate " .. unitsEvacuatedThreshold .. " units.") + destroyAirbases = player.AddObjective("Destroy the nearby Soviet airbases.", "Secondary", false) + evacuateMgg = player.AddObjective("Evacuate at least one mobile gap generator.", "Secondary", false) end end) @@ -345,7 +345,7 @@ WorldLoaded = function() end) end) - sovietObjective = soviets.AddPrimaryObjective("Eradicate all allied troops.") + sovietObjective = soviets.AddObjective("Eradicate all allied troops.") if not allies2 or allies1.IsLocalPlayer then Camera.Position = Allies1EntryPoint.CenterPosition diff --git a/mods/ra/maps/infiltration/infiltration.lua b/mods/ra/maps/infiltration/infiltration.lua index 150126d9c3..4eeb4b8e6a 100644 --- a/mods/ra/maps/infiltration/infiltration.lua +++ b/mods/ra/maps/infiltration/infiltration.lua @@ -82,8 +82,8 @@ reinforcementsHaveArrived = false LabInfiltrated = function() Utils.Do(humans, function(player) if player then - secureLab = player.AddPrimaryObjective("Secure the laboratory by eliminating its guards.") - destroyBase = player.AddPrimaryObjective("Destroy the remaining Soviet presence.") + secureLab = player.AddObjective("Secure the laboratory by eliminating its guards.") + destroyBase = player.AddObjective("Destroy the remaining Soviet presence.") player.MarkCompletedObjective(infiltrateLab) Trigger.ClearAll(Lab) Trigger.AfterDelay(0, function() @@ -173,7 +173,7 @@ end InsertSpies = function() Utils.Do(humans, function(player) if player then - infiltrateLab = player.AddPrimaryObjective("Get our spy into the laboratory undetected.") + infiltrateLab = player.AddObjective("Get our spy into the laboratory undetected.") end end) diff --git a/mods/ra/maps/intervention/intervention.lua b/mods/ra/maps/intervention/intervention.lua index 4130983bb2..16445c5fd5 100644 --- a/mods/ra/maps/intervention/intervention.lua +++ b/mods/ra/maps/intervention/intervention.lua @@ -270,9 +270,9 @@ WorldLoaded = function() Media.PlaySpeechNotification(player, "MissionFailed") end) - sovietObjective = soviets.AddPrimaryObjective("Destroy the village.") - villageObjective = player.AddPrimaryObjective("Save the village.") - beachheadObjective = player.AddPrimaryObjective("Get your MCV to the main island.") + sovietObjective = soviets.AddObjective("Destroy the village.") + villageObjective = player.AddObjective("Save the village.") + beachheadObjective = player.AddObjective("Get your MCV to the main island.") beachheadTrigger = false Trigger.OnExitedFootprint(BeachheadTrigger, function(a, id) @@ -281,7 +281,7 @@ WorldLoaded = function() Trigger.RemoveFootprintTrigger(id) player.MarkCompletedObjective(beachheadObjective) - captureObjective = player.AddPrimaryObjective("Locate and capture the enemy's Air Force HQ.") + captureObjective = player.AddObjective("Locate and capture the enemy's Air Force HQ.") if AirForceHQ.IsDead then player.MarkFailedObjective(captureObjective) diff --git a/mods/ra/maps/monster-tank-madness/monster-tank-madness.lua b/mods/ra/maps/monster-tank-madness/monster-tank-madness.lua index d14f32ed95..99aa84edc7 100644 --- a/mods/ra/maps/monster-tank-madness/monster-tank-madness.lua +++ b/mods/ra/maps/monster-tank-madness/monster-tank-madness.lua @@ -67,9 +67,9 @@ SetupAlliedBase = function() AlliedBaseHarv.Owner = player AlliedBaseHarv.FindResources() - FindDemitri = player.AddPrimaryObjective("Find Dr. Demitri. He is likely hiding in the village\n to the far south.") - InfiltrateRadarDome = player.AddPrimaryObjective("Reprogram the super tanks by sending a spy into\n the Soviet radar dome.") - DefendOutpost = player.AddSecondaryObjective("Defend and repair our outpost.") + FindDemitri = player.AddObjective("Find Dr. Demitri. He is likely hiding in the village\n to the far south.") + InfiltrateRadarDome = player.AddObjective("Reprogram the super tanks by sending a spy into\n the Soviet radar dome.") + DefendOutpost = player.AddObjective("Defend and repair our outpost.", "Secondary", false) player.MarkCompletedObjective(FindOutpost) -- Don't fail the Objective instantly @@ -207,7 +207,7 @@ CreateDemitri = function() demitri.Move(DemitriTriggerAreaCenter.Location) Media.PlaySpeechNotification(player, "TargetFreed") - EvacuateDemitri = player.AddPrimaryObjective("Evacuate Dr. Demitri with the helicopter waiting\n at our outpost.") + EvacuateDemitri = player.AddObjective("Evacuate Dr. Demitri with the helicopter waiting\n at our outpost.") player.MarkCompletedObjective(FindDemitri) local flarepos = CPos.New(DemitriLZ.Location.X, DemitriLZ.Location.Y - 1) @@ -299,15 +299,15 @@ InitObjectives = function() Media.DisplayMessage(p.GetObjectiveDescription(id), "New " .. string.lower(p.GetObjectiveType(id)) .. " objective") end) - EliminateSuperTanks = player.AddPrimaryObjective("Eliminate these super tanks.") - StealMoney = player.AddPrimaryObjective("Steal money from the nearby outpost with the Thief.") - CrossRiver = player.AddPrimaryObjective("Secure transport to the mainland.") - FindOutpost = player.AddPrimaryObjective("Find our outpost and start repairs on it.") - RescueCivilians = player.AddSecondaryObjective("Evacuate all civilians from the hospital.") - BadGuyObj = badguy.AddPrimaryObjective("Deny the destruction of the super tanks.") - USSRObj = ussr.AddPrimaryObjective("Deny the destruction of the super tanks.") - UkraineObj = ukraine.AddPrimaryObjective("Survive.") - TurkeyObj = turkey.AddPrimaryObjective("Destroy.") + EliminateSuperTanks = player.AddObjective("Eliminate these super tanks.") + StealMoney = player.AddObjective("Steal money from the nearby outpost with the Thief.") + CrossRiver = player.AddObjective("Secure transport to the mainland.") + FindOutpost = player.AddObjective("Find our outpost and start repairs on it.") + RescueCivilians = player.AddObjective("Evacuate all civilians from the hospital.", "Secondary", false) + BadGuyObj = badguy.AddObjective("Deny the destruction of the super tanks.") + USSRObj = ussr.AddObjective("Deny the destruction of the super tanks.") + UkraineObj = ukraine.AddObjective("Survive.") + TurkeyObj = turkey.AddObjective("Destroy.") Trigger.OnObjectiveCompleted(player, function(p, id) Media.DisplayMessage(p.GetObjectiveDescription(id), "Objective completed") diff --git a/mods/ra/maps/sarin-gas-1-crackdown/crackdown.lua b/mods/ra/maps/sarin-gas-1-crackdown/crackdown.lua index b7f1cfb345..da4c85098d 100644 --- a/mods/ra/maps/sarin-gas-1-crackdown/crackdown.lua +++ b/mods/ra/maps/sarin-gas-1-crackdown/crackdown.lua @@ -142,10 +142,10 @@ WorldLoaded = function() Media.DisplayMessage(p.GetObjectiveDescription(id), "New " .. string.lower(p.GetObjectiveType(id)) .. " objective") end) - objDestroyAllTrucks = greece.AddPrimaryObjective("Prevent Soviet convoy trucks from escaping.") - objKillAll = greece.AddPrimaryObjective("Clear the sector of all Soviet presence.") - objRadarSpy = greece.AddSecondaryObjective("Infiltrate the Soviet Radar Dome to reveal truck \necape routes.") - ussrObj = ussr.AddPrimaryObjective("Deny the Allies.") + objDestroyAllTrucks = greece.AddObjective("Prevent Soviet convoy trucks from escaping.") + objKillAll = greece.AddObjective("Clear the sector of all Soviet presence.") + objRadarSpy = greece.AddObjective("Infiltrate the Soviet Radar Dome to reveal truck \necape routes.", "Secondary", false) + ussrObj = ussr.AddObjective("Deny the Allies.") Trigger.OnObjectiveCompleted(greece, function(p, id) Media.DisplayMessage(p.GetObjectiveDescription(id), "Objective completed") diff --git a/mods/ra/maps/sarin-gas-2-down-under/downunder.lua b/mods/ra/maps/sarin-gas-2-down-under/downunder.lua index 790ab1839e..80d82c7eed 100644 --- a/mods/ra/maps/sarin-gas-2-down-under/downunder.lua +++ b/mods/ra/maps/sarin-gas-2-down-under/downunder.lua @@ -463,11 +463,11 @@ WorldLoaded = function() Media.DisplayMessage(p.GetObjectiveDescription(id), "New " .. string.lower(p.GetObjectiveType(id)) .. " objective") end) - ussrObj = ussr.AddPrimaryObjective("Defeat the Allies.") - ExitBase = greece.AddPrimaryObjective("Reach the eastern exit of the facility.") - FreeTanya = greece.AddPrimaryObjective("Free Tanya and keep her alive.") - KillVIPs = greece.AddSecondaryObjective("Kill all Soviet officers and scientists.") - StealTank = greece.AddSecondaryObjective("Steal a Soviet mammoth tank.") + ussrObj = ussr.AddObjective("Defeat the Allies.") + ExitBase = greece.AddObjective("Reach the eastern exit of the facility.") + FreeTanya = greece.AddObjective("Free Tanya and keep her alive.") + KillVIPs = greece.AddObjective("Kill all Soviet officers and scientists.", "Secondary", false) + StealTank = greece.AddObjective("Steal a Soviet mammoth tank.", "Secondary", false) if Map.LobbyOption("difficulty") == "hard" then NoCasualties = greece.AddPrimaryObjective("Do not lose a single soldier or civilian\nunder your command.") end diff --git a/mods/ra/maps/soviet-01/soviet01.lua b/mods/ra/maps/soviet-01/soviet01.lua index 995636f78d..9c03e1fa70 100644 --- a/mods/ra/maps/soviet-01/soviet01.lua +++ b/mods/ra/maps/soviet-01/soviet01.lua @@ -82,7 +82,7 @@ WorldLoaded = function() Media.DisplayMessage(p.GetObjectiveDescription(id), "Objective failed") end) - VillageRaidObjective = player.AddPrimaryObjective("Raze the village.") + VillageRaidObjective = player.AddObjective("Raze the village.") Trigger.OnAllRemovedFromWorld(Airfields, function() player.MarkFailedObjective(VillageRaidObjective) diff --git a/mods/ra/maps/soviet-02a/soviet02a.lua b/mods/ra/maps/soviet-02a/soviet02a.lua index 703828b9f0..38086c9a0c 100644 --- a/mods/ra/maps/soviet-02a/soviet02a.lua +++ b/mods/ra/maps/soviet-02a/soviet02a.lua @@ -60,8 +60,8 @@ WorldLoaded = function() Media.DisplayMessage(p.GetObjectiveDescription(id), "Objective failed") end) - CommandCenterIntact = player.AddPrimaryObjective("Protect the Command Center.") - DestroyAllAllied = player.AddPrimaryObjective("Destroy all Allied units and structures.") + CommandCenterIntact = player.AddObjective("Protect the Command Center.") + DestroyAllAllied = player.AddObjective("Destroy all Allied units and structures.") Trigger.OnPlayerWon(player, function() Media.PlaySpeechNotification(player, "MissionAccomplished") diff --git a/mods/ra/maps/soviet-02b/soviet02b.lua b/mods/ra/maps/soviet-02b/soviet02b.lua index d35310d41e..8374a70d46 100644 --- a/mods/ra/maps/soviet-02b/soviet02b.lua +++ b/mods/ra/maps/soviet-02b/soviet02b.lua @@ -193,9 +193,9 @@ WorldLoaded = function() Trigger.OnPlayerLost(player, function() Media.PlaySpeechNotification(player, "Lose") end) - alliedObjective = enemy.AddPrimaryObjective("Destroy all Soviet troops.") - sovietObjective1 = player.AddPrimaryObjective("Protect the Command Center.") - sovietObjective2 = player.AddPrimaryObjective("Destroy all Allied units and structures.") + alliedObjective = enemy.AddObjective("Destroy all Soviet troops.") + sovietObjective1 = player.AddObjective("Protect the Command Center.") + sovietObjective2 = player.AddObjective("Destroy all Allied units and structures.") enemy.Resources = 2000 Trigger.AfterDelay(DateTime.Seconds(30), ProduceInfantry) diff --git a/mods/ra/maps/soviet-03/soviet03.lua b/mods/ra/maps/soviet-03/soviet03.lua index c17f64baac..c58196fdd7 100644 --- a/mods/ra/maps/soviet-03/soviet03.lua +++ b/mods/ra/maps/soviet-03/soviet03.lua @@ -352,10 +352,10 @@ WorldLoaded = function() Trigger.OnPlayerLost(player, function() Media.PlaySpeechNotification(player, "Lose") end) - alliedObjective = enemy.AddPrimaryObjective("Destroy all Soviet troops.") - sovietObjective1 = player.AddPrimaryObjective("Kill the enemy spy.") - sovietObjective2 = player.AddSecondaryObjective("Clear the nearby farm for reinforcements.") - sovietObjective3 = player.AddSecondaryObjective("Scavenge the civilian buildings for supplies.") + alliedObjective = enemy.AddObjective("Destroy all Soviet troops.") + sovietObjective1 = player.AddObjective("Kill the enemy spy.") + sovietObjective2 = player.AddObjective("Clear the nearby farm for reinforcements.", "Secondary", false) + sovietObjective3 = player.AddObjective("Scavenge the civilian buildings for supplies.", "Secondary", false) end Trigger.OnKilled(TheSpy, function() diff --git a/mods/ra/maps/soviet-04a/soviet04a.lua b/mods/ra/maps/soviet-04a/soviet04a.lua index eef152018d..dc52ca2fd8 100644 --- a/mods/ra/maps/soviet-04a/soviet04a.lua +++ b/mods/ra/maps/soviet-04a/soviet04a.lua @@ -142,9 +142,9 @@ WorldLoaded = function() Media.DisplayMessage(p.GetObjectiveDescription(id), "Objective failed") end) - KillAll = player.AddPrimaryObjective("Defeat the Allied forces.") - BeatUSSR = Greece.AddPrimaryObjective("Defeat the Soviet forces.") - KillRadar = player.AddSecondaryObjective("Destroy Allied Radar Dome to stop enemy\nreinforcements.") + KillAll = player.AddObjective("Defeat the Allied forces.") + BeatUSSR = Greece.AddObjective("Defeat the Soviet forces.") + KillRadar = player.AddObjective("Destroy Allied Radar Dome to stop enemy\nreinforcements.", "Secondary", false) Trigger.OnPlayerLost(player, function() Media.PlaySpeechNotification(player, "Lose") diff --git a/mods/ra/maps/soviet-04b/soviet04b.lua b/mods/ra/maps/soviet-04b/soviet04b.lua index d4a54e4083..2ce7922b1f 100644 --- a/mods/ra/maps/soviet-04b/soviet04b.lua +++ b/mods/ra/maps/soviet-04b/soviet04b.lua @@ -127,9 +127,9 @@ WorldLoaded = function() Media.DisplayMessage(p.GetObjectiveDescription(id), "Objective failed") end) - KillAll = player.AddPrimaryObjective("Defeat the Allied forces.") - BeatUSSR = Greece.AddPrimaryObjective("Defeat the Soviet forces.") - KillRadar = player.AddSecondaryObjective("Destroy Allied Radar Dome to stop enemy\nreinforcements.") + KillAll = player.AddObjective("Defeat the Allied forces.") + BeatUSSR = Greece.AddObjective("Defeat the Soviet forces.") + KillRadar = player.AddObjective("Destroy Allied Radar Dome to stop enemy\nreinforcements.", "Secondary", false) Trigger.OnPlayerLost(player, function() Media.PlaySpeechNotification(player, "Lose") diff --git a/mods/ra/maps/soviet-05/soviet05.lua b/mods/ra/maps/soviet-05/soviet05.lua index a21fe97dc9..4c93471b4f 100644 --- a/mods/ra/maps/soviet-05/soviet05.lua +++ b/mods/ra/maps/soviet-05/soviet05.lua @@ -197,9 +197,9 @@ WorldLoaded = function() Media.DisplayMessage(p.GetObjectiveDescription(id), "Objective failed") end) - CaptureObjective = player.AddPrimaryObjective("Capture the Radar Dome.") - KillAll = player.AddPrimaryObjective("Defeat the Allied forces.") - BeatUSSR = GoodGuy.AddPrimaryObjective("Defeat the Soviet forces.") + CaptureObjective = player.AddObjective("Capture the Radar Dome.") + KillAll = player.AddObjective("Defeat the Allied forces.") + BeatUSSR = GoodGuy.AddObjective("Defeat the Soviet forces.") RunInitialActivities() @@ -223,7 +223,7 @@ WorldLoaded = function() return end - HoldObjective = player.AddPrimaryObjective("Defend the Radar Dome.") + HoldObjective = player.AddObjective("Defend the Radar Dome.") player.MarkCompletedObjective(CaptureObjective) Beacon.New(player, MCVDeploy.CenterPosition) if Map.LobbyOption("difficulty") == "easy" then diff --git a/mods/ra/maps/soviet-06a/soviet06a.lua b/mods/ra/maps/soviet-06a/soviet06a.lua index a8c5d99579..d1727b1c0a 100644 --- a/mods/ra/maps/soviet-06a/soviet06a.lua +++ b/mods/ra/maps/soviet-06a/soviet06a.lua @@ -145,10 +145,10 @@ WorldLoaded = function() Trigger.OnPlayerLost(player, function() Media.PlaySpeechNotification(player, "Lose") end) - alliedObjective = enemy.AddPrimaryObjective("Destroy all Soviet troops.") - sovietObjective = player.AddPrimaryObjective("Escort the Convoy.") - sovietObjective2 = player.AddSecondaryObjective("Destroy or capture the Allied radar dome to stop\nenemy reinforcements.") - SaveAllTrucks = player.AddSecondaryObjective("Keep all trucks alive.") + alliedObjective = enemy.AddObjective("Destroy all Soviet troops.") + sovietObjective = player.AddObjective("Escort the Convoy.") + sovietObjective2 = player.AddObjective("Destroy or capture the Allied radar dome to stop\nenemy reinforcements.", "Secondary", false) + SaveAllTrucks = player.AddObjective("Keep all trucks alive.", "Secondary", false) end Tick = function() diff --git a/mods/ra/maps/soviet-06b/soviet06b.lua b/mods/ra/maps/soviet-06b/soviet06b.lua index edbb4e5fff..99f739a6f2 100644 --- a/mods/ra/maps/soviet-06b/soviet06b.lua +++ b/mods/ra/maps/soviet-06b/soviet06b.lua @@ -110,10 +110,10 @@ WorldLoaded = function() Trigger.OnPlayerLost(player, function() Media.PlaySpeechNotification(player, "Lose") end) - alliedObjective = enemy.AddPrimaryObjective("Destroy all Soviet troops.") - sovietObjective = player.AddPrimaryObjective("Escort the Convoy.") - sovietObjective2 = player.AddSecondaryObjective("Destroy or capture the Allied radar dome to stop\nenemy reinforcements.") - SaveAllTrucks = player.AddSecondaryObjective("Keep all trucks alive.") + alliedObjective = enemy.AddObjective("Destroy all Soviet troops.") + sovietObjective = player.AddObjective("Escort the Convoy.") + sovietObjective2 = player.AddObjective("Destroy or capture the Allied radar dome to stop\nenemy reinforcements.", "Secondary", false) + SaveAllTrucks = player.AddObjective("Keep all trucks alive.", "Secondary", false) end Tick = function() diff --git a/mods/ra/maps/soviet-07/soviet07.lua b/mods/ra/maps/soviet-07/soviet07.lua index d9de90ee4c..d340aaf51e 100644 --- a/mods/ra/maps/soviet-07/soviet07.lua +++ b/mods/ra/maps/soviet-07/soviet07.lua @@ -293,13 +293,13 @@ WorldLoaded = function() Media.PlaySpeechNotification(player, "Lose") end) - alliedObjective = enemy.AddPrimaryObjective("Destroy all Soviet troops.") - sovietObjective1 = player.AddPrimaryObjective("Deactivate the security system.") - sovietObjective2 = player.AddPrimaryObjective("Rescue the engineers.") - sovietObjective3 = player.AddPrimaryObjective("Get the engineers to the coolant stations.") - sovietObjective4 = player.AddPrimaryObjective("Use an Engineer to reprogram the security system.") - sovietObjective5 = player.AddPrimaryObjective("Get an Engineer to the reactor core.") - sovietObjective6 = player.AddSecondaryObjective("Free the dogs.") + alliedObjective = enemy.AddObjective("Destroy all Soviet troops.") + sovietObjective1 = player.AddObjective("Deactivate the security system.") + sovietObjective2 = player.AddObjective("Rescue the engineers.") + sovietObjective3 = player.AddObjective("Get the engineers to the coolant stations.") + sovietObjective4 = player.AddObjective("Use an Engineer to reprogram the security system.") + sovietObjective5 = player.AddObjective("Get an Engineer to the reactor core.") + sovietObjective6 = player.AddObjective("Free the dogs.", "Secondary", false) end Tick = function() diff --git a/mods/ra/maps/soviet-soldier-volkov-n-chitzkoi/soviet-soldier-volkov-n-chitzkoi.lua b/mods/ra/maps/soviet-soldier-volkov-n-chitzkoi/soviet-soldier-volkov-n-chitzkoi.lua index b8ec9289aa..0c3083767f 100644 --- a/mods/ra/maps/soviet-soldier-volkov-n-chitzkoi/soviet-soldier-volkov-n-chitzkoi.lua +++ b/mods/ra/maps/soviet-soldier-volkov-n-chitzkoi/soviet-soldier-volkov-n-chitzkoi.lua @@ -80,10 +80,10 @@ WorldLoaded = function() Media.DisplayMessage(p.GetObjectiveDescription(id), "Objective failed") end) - DestroyControlCenter = player.AddPrimaryObjective("Destroy the Control Center.") - KeepTanksAlive = player.AddPrimaryObjective("Your tank division must not be destroyed before\n the alloy facility is dealt with.") - KeepVolkovAlive = player.AddPrimaryObjective("Keep Volkov Alive.") - KeepChitzkoiAlive = player.AddSecondaryObjective("Keep Chitzkoi Alive.") + DestroyControlCenter = player.AddObjective("Destroy the Control Center.") + KeepTanksAlive = player.AddObjective("Your tank division must not be destroyed before\n the alloy facility is dealt with.") + KeepVolkovAlive = player.AddObjective("Keep Volkov Alive.") + KeepChitzkoiAlive = player.AddObjective("Keep Chitzkoi Alive.", "Secondary", false) Trigger.OnPlayerWon(player, function() Media.PlaySpeechNotification(player, "MissionAccomplished") @@ -97,7 +97,7 @@ WorldLoaded = function() if not struc.IsDead then struc.Kill() end end) player.MarkCompletedObjective(DestroyControlCenter) - DestroyAlloyFacility = player.AddPrimaryObjective("Destroy the Alloy Facility.") + DestroyAlloyFacility = player.AddObjective("Destroy the Alloy Facility.") Media.PlaySpeechNotification(player, "FirstObjectiveMet") Media.DisplayMessage("Excellent! The heavy turret control center is destroyed\n and now we can deal with the alloy facility.") end) @@ -105,7 +105,7 @@ WorldLoaded = function() Trigger.OnKilled(AlloyFacility, function() if not player.IsObjectiveCompleted(DestroyControlCenter) then --Prevent a crash if the player somehow manage to cheese the mission and destroy player.MarkCompletedObjective(DestroyControlCenter) --the Alloy Facility without destroying the Control Center. - DestroyAlloyFacility = player.AddPrimaryObjective("Destroy the Alloy Facility.") + DestroyAlloyFacility = player.AddObjective("Destroy the Alloy Facility.") end Trigger.AfterDelay(DateTime.Seconds(2), function() player.MarkCompletedObjective(DestroyAlloyFacility) diff --git a/mods/ra/maps/survival01/survival01.lua b/mods/ra/maps/survival01/survival01.lua index 84cf6d207b..769244bdf0 100644 --- a/mods/ra/maps/survival01/survival01.lua +++ b/mods/ra/maps/survival01/survival01.lua @@ -277,9 +277,9 @@ TimerExpired = function() Reinforcements.Reinforce(allies, FrenchReinforcements, { SovietEntryPoint7.Location, Alliesbase.Location }) if DestroyObj then - KillObj = allies.AddPrimaryObjective("Take control of French reinforcements and\nkill all remaining Soviet forces.") + KillObj = allies.AddObjective("Take control of French reinforcements and\nkill all remaining Soviet forces.") else - DestroyObj = allies.AddPrimaryObjective("Take control of French reinforcements and\ndismantle the nearby Soviet base.") + DestroyObj = allies.AddObjective("Take control of French reinforcements and\ndismantle the nearby Soviet base.") end allies.MarkCompletedObjective(SurviveObj) @@ -310,11 +310,11 @@ InitObjectives = function() Media.DisplayMessage(p.GetObjectiveDescription(id), "New " .. string.lower(p.GetObjectiveType(id)) .. " objective") end) - SurviveObj = allies.AddPrimaryObjective("Enforce your position and hold-out the onslaught\nuntil reinforcements arrive.") - KillSams = allies.AddSecondaryObjective("Destroy the two SAM sites before reinforcements\narrive.") + SurviveObj = allies.AddObjective("Enforce your position and hold-out the onslaught\nuntil reinforcements arrive.") + KillSams = allies.AddObjective("Destroy the two SAM sites before reinforcements\narrive.", "Secondary", false) Media.DisplayMessage("The Soviets are blocking our GPS. We need to investigate their new technology.") - CaptureAirfields = allies.AddSecondaryObjective("Capture and hold the Soviet airbase\nin the northeast.") - SovietObj = soviets.AddPrimaryObjective("Eliminate all Allied forces.") + CaptureAirfields = allies.AddObjective("Capture and hold the Soviet airbase\nin the northeast.", "Secondary", false) + SovietObj = soviets.AddObjective("Eliminate all Allied forces.") Trigger.OnObjectiveCompleted(allies, function(p, id) Media.DisplayMessage(p.GetObjectiveDescription(id), "Objective completed") @@ -367,11 +367,11 @@ InitMission = function() Trigger.OnAllKilledOrCaptured(SovietBuildings, function() if DestroyObj then if not soviets.HasNoRequiredUnits() then - KillObj = allies.AddPrimaryObjective("Kill all remaining Soviet forces.") + KillObj = allies.AddObjective("Kill all remaining Soviet forces.") end allies.MarkCompletedObjective(DestroyObj) else - DestroyObj = allies.AddPrimaryObjective("Dismantle the nearby Soviet base.") + DestroyObj = allies.AddObjective("Dismantle the nearby Soviet base.") allies.MarkCompletedObjective(DestroyObj) end end) diff --git a/mods/ra/maps/survival02/survival02.lua b/mods/ra/maps/survival02/survival02.lua index 0af7aca0ed..dbd7b846ec 100644 --- a/mods/ra/maps/survival02/survival02.lua +++ b/mods/ra/maps/survival02/survival02.lua @@ -82,7 +82,7 @@ Tick = function() if DestroyObj then allies.MarkCompletedObjective(DestroyObj) else - DestroyObj = allies.AddPrimaryObjective("Destroy all Soviet forces in the area.") + DestroyObj = allies.AddObjective("Destroy all Soviet forces in the area.") allies.MarkCompletedObjective(DestroyObj) end end @@ -220,7 +220,7 @@ FinalAttack = function() Trigger.OnAllKilledOrCaptured(units, function() if not DestroyObj then Media.DisplayMessage("Excellent work Commander! We have reinforced our position enough to initiate a counter-attack.", "Incoming Report") - DestroyObj = allies.AddPrimaryObjective("Destroy the remaining Soviet forces in the area.") + DestroyObj = allies.AddObjective("Destroy the remaining Soviet forces in the area.") end allies.MarkCompletedObjective(SurviveObj) end) @@ -260,7 +260,7 @@ SetupBridges = function() end Media.DisplayMessage("Commander! The Soviets destroyed the bridges to disable our reinforcements. Repair them for additional reinforcements.", "Incoming Report") - RepairBridges = allies.AddSecondaryObjective("Repair the two southern bridges.") + RepairBridges = allies.AddObjective("Repair the two southern bridges.", "Secondary", false) local bridgeA = Map.ActorsInCircle(BrokenBridge1.CenterPosition, WDist.FromCells(1), function(self) return self.Type == "bridge1" end) local bridgeB = Map.ActorsInCircle(BrokenBridge2.CenterPosition, WDist.FromCells(1), function(self) return self.Type == "bridge1" end) @@ -295,8 +295,8 @@ InitObjectives = function() Media.DisplayMessage(p.GetObjectiveDescription(id), "New " .. string.lower(p.GetObjectiveType(id)) .. " objective") end) - SurviveObj = allies.AddPrimaryObjective("Enforce your position and hold-out the onslaught.") - SovietObj = soviets.AddPrimaryObjective("Eliminate all Allied forces.") + SurviveObj = allies.AddObjective("Enforce your position and hold-out the onslaught.") + SovietObj = soviets.AddObjective("Eliminate all Allied forces.") Trigger.AfterDelay(DateTime.Seconds(15), function() SetupBridges() diff --git a/mods/ra/maps/top-o-the-world/top-o-the-world.lua b/mods/ra/maps/top-o-the-world/top-o-the-world.lua index ae1f0ddd0b..7500d12fd1 100644 --- a/mods/ra/maps/top-o-the-world/top-o-the-world.lua +++ b/mods/ra/maps/top-o-the-world/top-o-the-world.lua @@ -110,10 +110,10 @@ WorldLoaded = function() Media.DisplayMessage(p.GetObjectiveDescription(id), "Objective failed") end) - BringSupplyTruck = player.AddPrimaryObjective("Bring the supply truck to the waystation.") - ProtectWaystation = player.AddPrimaryObjective("The waystation must not be destroyed.") - DestroyAAGuns = player.AddSecondaryObjective("Destroy all the AA Guns to enable air support.") - PreventAlliedIncursions = player.AddSecondaryObjective("Find and destroy the bridge the allies are using\nto bring their reinforcements in the area.") + BringSupplyTruck = player.AddObjective("Bring the supply truck to the waystation.") + ProtectWaystation = player.AddObjective("The waystation must not be destroyed.") + DestroyAAGuns = player.AddObjective("Destroy all the AA Guns to enable air support.", "Secondary", false) + PreventAlliedIncursions = player.AddObjective("Find and destroy the bridge the allies are using\nto bring their reinforcements in the area.", "Secondary", false) Trigger.OnPlayerWon(player, function() Media.PlaySpeechNotification(player, "MissionAccomplished")