Add text feedback for type selection hotkey when selection is empty

This commit is contained in:
Ivaylo Draganov
2021-06-17 17:15:07 +03:00
committed by Matthias Mailänder
parent 3c77df276a
commit 9b9c116097

View File

@@ -261,7 +261,10 @@ namespace OpenRA.Mods.Common.Widgets
else if (SelectSameTypeKey.IsActivatedBy(e) && !World.IsGameOver)
{
if (!World.Selection.Actors.Any())
{
TextNotificationsManager.AddFeedbackLine("Nothing selected.");
return false;
}
var ownedActors = World.Selection.Actors
.Where(x => !x.IsDead && eligiblePlayers.Contains(x.Owner))