From 11e5d19f326edf9f26badde030e1e4aae31f0e07 Mon Sep 17 00:00:00 2001 From: Paul Chote Date: Mon, 19 Dec 2022 12:28:05 +1300 Subject: [PATCH] Prioritise primary buildings in CycleBasesHotkeyLogic. --- .../Widgets/Logic/Ingame/Hotkeys/CycleBasesHotkeyLogic.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/OpenRA.Mods.Common/Widgets/Logic/Ingame/Hotkeys/CycleBasesHotkeyLogic.cs b/OpenRA.Mods.Common/Widgets/Logic/Ingame/Hotkeys/CycleBasesHotkeyLogic.cs index c27c965ea9..0b403410d7 100644 --- a/OpenRA.Mods.Common/Widgets/Logic/Ingame/Hotkeys/CycleBasesHotkeyLogic.cs +++ b/OpenRA.Mods.Common/Widgets/Logic/Ingame/Hotkeys/CycleBasesHotkeyLogic.cs @@ -41,6 +41,8 @@ namespace OpenRA.Mods.Common.Widgets.Logic.Ingame var bases = world.ActorsHavingTrait() .Where(a => a.Owner == player) + .OrderByDescending(a => a.IsPrimaryBuilding()) + .ThenBy(a => a.ActorID) .ToList(); // If no BaseBuilding exist pick the first selectable Building.