diff --git a/OpenRA.Mods.Common/Traits/Player/ConquestVictoryConditions.cs b/OpenRA.Mods.Common/Traits/Player/ConquestVictoryConditions.cs index 7137e6de78..1becb442c3 100644 --- a/OpenRA.Mods.Common/Traits/Player/ConquestVictoryConditions.cs +++ b/OpenRA.Mods.Common/Traits/Player/ConquestVictoryConditions.cs @@ -38,7 +38,7 @@ namespace OpenRA.Mods.Common.Traits if (self.Owner.WinState != WinState.Undefined || self.Owner.NonCombatant) return; if (objectiveID < 0) - objectiveID = mo.Add(self.Owner, "Destroy all opposition!"); + objectiveID = mo.Add(self.Owner, "Destroy all opposition!", ObjectiveType.Primary, true); if (!self.Owner.NonCombatant && self.Owner.HasNoRequiredUnits()) mo.MarkFailed(self.Owner, objectiveID); diff --git a/OpenRA.Mods.Common/Traits/Player/MissionObjectives.cs b/OpenRA.Mods.Common/Traits/Player/MissionObjectives.cs index ff86f180d0..6d7aa0a1d7 100644 --- a/OpenRA.Mods.Common/Traits/Player/MissionObjectives.cs +++ b/OpenRA.Mods.Common/Traits/Player/MissionObjectives.cs @@ -72,13 +72,13 @@ namespace OpenRA.Mods.Common.Traits world.ObserveAfterWinOrLose = !info.EarlyGameOver; } - public int Add(Player player, string description, ObjectiveType type = ObjectiveType.Primary) + public int Add(Player player, string description, ObjectiveType type = ObjectiveType.Primary, bool inhibitAnnouncement = false) { var newID = objectives.Count; objectives.Insert(newID, new MissionObjective(type, description)); - ObjectiveAdded(player); + ObjectiveAdded(player, inhibitAnnouncement); foreach (var inou in player.PlayerActor.TraitsImplementing()) inou.OnObjectiveAdded(player, newID); @@ -231,7 +231,7 @@ namespace OpenRA.Mods.Common.Traits MarkFailed(player, id); } - public event Action ObjectiveAdded = player => { player.HasObjectives = true; }; + public event Action ObjectiveAdded = (player, inhibitAnnouncement) => { player.HasObjectives = true; }; public void OnObjectiveAdded(Player player, int id) { } public void OnObjectiveCompleted(Player player, int id) { } diff --git a/OpenRA.Mods.Common/Traits/Player/StrategicVictoryConditions.cs b/OpenRA.Mods.Common/Traits/Player/StrategicVictoryConditions.cs index e58e41e443..f1e29c0837 100644 --- a/OpenRA.Mods.Common/Traits/Player/StrategicVictoryConditions.cs +++ b/OpenRA.Mods.Common/Traits/Player/StrategicVictoryConditions.cs @@ -68,7 +68,7 @@ namespace OpenRA.Mods.Common.Traits if (player.WinState != WinState.Undefined || player.NonCombatant) return; if (objectiveID < 0) - objectiveID = mo.Add(player, "Hold all the strategic positions for a specified time!"); + objectiveID = mo.Add(player, "Hold all the strategic positions for a specified time!", ObjectiveType.Primary, true); if (!self.Owner.NonCombatant && self.Owner.HasNoRequiredUnits()) mo.MarkFailed(self.Owner, objectiveID); diff --git a/OpenRA.Mods.Common/Widgets/Logic/Ingame/GameInfoObjectivesLogic.cs b/OpenRA.Mods.Common/Widgets/Logic/Ingame/GameInfoObjectivesLogic.cs index f10276ab7d..3f68270eb4 100644 --- a/OpenRA.Mods.Common/Widgets/Logic/Ingame/GameInfoObjectivesLogic.cs +++ b/OpenRA.Mods.Common/Widgets/Logic/Ingame/GameInfoObjectivesLogic.cs @@ -41,7 +41,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic PopulateObjectivesList(mo, objectivesPanel, template); - Action redrawObjectives = player => + Action redrawObjectives = (player, _) => { if (player == lp) PopulateObjectivesList(mo, objectivesPanel, template); diff --git a/OpenRA.Mods.Common/Widgets/Logic/Ingame/MenuButtonsChromeLogic.cs b/OpenRA.Mods.Common/Widgets/Logic/Ingame/MenuButtonsChromeLogic.cs index f6972aceae..0e4c082a11 100644 --- a/OpenRA.Mods.Common/Widgets/Logic/Ingame/MenuButtonsChromeLogic.cs +++ b/OpenRA.Mods.Common/Widgets/Logic/Ingame/MenuButtonsChromeLogic.cs @@ -55,9 +55,9 @@ namespace OpenRA.Mods.Common.Widgets.Logic if (lp != null) { - Action startBlinking = player => + Action startBlinking = (player, inhibitAnnouncement) => { - if (player == world.LocalPlayer) + if (!inhibitAnnouncement && player == world.LocalPlayer) blinking = true; };