custom commands that don't erase the order queue when given without shift?
Posted: 04 Feb 2016, 00:26
Some commands, such as CMD.ATTACK, if given without the shift modifier, will overwrite the units current order queue. Others, such as CMD.ONOFF, won't. Is there a way for a custom command to decide which of these behaviours it wants? If not, feature request please - the default is the first case and I haven't found a clean way to get second.
(The reason: since custom commands are implemented in lua anyway, one can hackily workaround the issue by returning false in gadget:AllowCommand for the custom command; the order queue is then preserved but it has the unwanted side effect that then in some cases LuaUI & elsewhere sees it as though the command was never given. For example, see BAs CMD.PASSIVE with a factory and note that widget:UnitCommand is not called because gadget:AllowCommand returned false.)
(The reason: since custom commands are implemented in lua anyway, one can hackily workaround the issue by returning false in gadget:AllowCommand for the custom command; the order queue is then preserved but it has the unwanted side effect that then in some cases LuaUI & elsewhere sees it as though the command was never given. For example, see BAs CMD.PASSIVE with a factory and note that widget:UnitCommand is not called because gadget:AllowCommand returned false.)