Shift+hotkey queues 5 units for production. Fixes #5544
This commit is contained in:
@@ -300,8 +300,12 @@ namespace OpenRA.Mods.Common.Widgets
|
|||||||
return false;
|
return false;
|
||||||
|
|
||||||
var hotkey = Hotkey.FromKeyInput(e);
|
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);
|
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()
|
public void RefreshIcons()
|
||||||
|
|||||||
Reference in New Issue
Block a user