From 2bbbdbeedb5ebd00ebd3d180b2d0a329ab4a9b55 Mon Sep 17 00:00:00 2001 From: Mykogen Date: Mon, 16 May 2016 00:02:00 +0200 Subject: [PATCH] Shift+hotkey queues 5 units for production. Fixes #5544 --- OpenRA.Mods.Common/Widgets/ProductionPaletteWidget.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/OpenRA.Mods.Common/Widgets/ProductionPaletteWidget.cs b/OpenRA.Mods.Common/Widgets/ProductionPaletteWidget.cs index 311c4dce5a..8634f7622b 100644 --- a/OpenRA.Mods.Common/Widgets/ProductionPaletteWidget.cs +++ b/OpenRA.Mods.Common/Widgets/ProductionPaletteWidget.cs @@ -300,8 +300,12 @@ namespace OpenRA.Mods.Common.Widgets return false; var hotkey = Hotkey.FromKeyInput(e); + var batchModifiers = e.Modifiers.HasModifier(Modifiers.Shift) ? Modifiers.Shift : Modifiers.None; + if (batchModifiers != Modifiers.None) + hotkey = new Hotkey(hotkey.Key, hotkey.Modifiers ^ Modifiers.Shift); + var toBuild = icons.Values.FirstOrDefault(i => i.Hotkey == hotkey); - return toBuild != null ? HandleEvent(toBuild, MouseButton.Left, Modifiers.None) : false; + return toBuild != null ? HandleEvent(toBuild, MouseButton.Left, batchModifiers) : false; } public void RefreshIcons()