diff --git a/OpenRA.Mods.Common/Traits/ProductionQueueFromSelection.cs b/OpenRA.Mods.Common/Traits/ProductionQueueFromSelection.cs index 4afdb3805c..ce8bf0ab6d 100644 --- a/OpenRA.Mods.Common/Traits/ProductionQueueFromSelection.cs +++ b/OpenRA.Mods.Common/Traits/ProductionQueueFromSelection.cs @@ -55,7 +55,7 @@ namespace OpenRA.Mods.Common.Traits if (queue == null) { var types = world.Selection.Actors.Where(a => a.IsInWorld && a.World.LocalPlayer == a.Owner) - .SelectMany(a => a.TraitsImplementing()) + .SelectMany(a => a.TraitsImplementing().Where(p => !p.IsTraitDisabled)) .SelectMany(t => t.Info.Produces); queue = world.LocalPlayer.PlayerActor.TraitsImplementing() diff --git a/OpenRA.Mods.Common/Widgets/Logic/Ingame/Hotkeys/CycleProductionActorsHotkeyLogic.cs b/OpenRA.Mods.Common/Widgets/Logic/Ingame/Hotkeys/CycleProductionActorsHotkeyLogic.cs index b4330e4724..b7a0b3b5bb 100644 --- a/OpenRA.Mods.Common/Widgets/Logic/Ingame/Hotkeys/CycleProductionActorsHotkeyLogic.cs +++ b/OpenRA.Mods.Common/Widgets/Logic/Ingame/Hotkeys/CycleProductionActorsHotkeyLogic.cs @@ -45,8 +45,9 @@ namespace OpenRA.Mods.Common.Widgets.Logic.Ingame var player = world.RenderPlayer ?? world.LocalPlayer; var facilities = world.ActorsHavingTrait() - .Where(a => a.Owner == player && !a.Info.HasTraitInfo()) - .OrderBy(f => f.Info.TraitInfo().Produces.First()) + .Where(a => a.Owner == player && !a.Info.HasTraitInfo() + && a.TraitsImplementing().Any(t => !t.IsTraitDisabled)) + .OrderBy(f => f.TraitsImplementing().First(t => !t.IsTraitDisabled).Info.Produces.First()) .ToList(); if (!facilities.Any())