Reduce duplication of "Battlefield Control" chat line label

This commit is contained in:
Ivaylo Draganov
2020-01-06 16:21:18 +02:00
committed by Paul Chote
parent 3e2022a3dd
commit 1dd1786469
8 changed files with 26 additions and 19 deletions

View File

@@ -281,12 +281,12 @@ namespace OpenRA.Mods.Common.Widgets
// Check if selecting actors on the screen has selected new units
if (ownUnitsOnScreen.Count > World.Selection.Actors.Count())
Game.AddSystemLine("Battlefield Control", "Selected across screen");
Game.AddSystemLine("Selected across screen");
else
{
// Select actors in the world that have highest selection priority
ownUnitsOnScreen = SelectActorsInWorld(World, null, eligiblePlayers).SubsetWithHighestSelectionPriority(e.Modifiers).ToList();
Game.AddSystemLine("Battlefield Control", "Selected across map");
Game.AddSystemLine("Selected across map");
}
World.Selection.Combine(World, ownUnitsOnScreen, false, false);
@@ -313,12 +313,12 @@ namespace OpenRA.Mods.Common.Widgets
// Check if selecting actors on the screen has selected new units
if (newSelection.Count > World.Selection.Actors.Count())
Game.AddSystemLine("Battlefield Control", "Selected across screen");
Game.AddSystemLine("Selected across screen");
else
{
// Select actors in the world that have the same selection class as one of the already selected actors
newSelection = SelectActorsInWorld(World, selectedClasses, eligiblePlayers).ToList();
Game.AddSystemLine("Battlefield Control", "Selected across map");
Game.AddSystemLine("Selected across map");
}
World.Selection.Combine(World, newSelection, true, false);