override default action, if FavBar slot has item

This commit is contained in:
He-Man 2017-10-05 21:58:24 +02:00
parent eadf92c1c0
commit 8a4ab15fd1
2 changed files with 2 additions and 1 deletions
Sources/epoch_code
compile/interface_event_handlers
gui/scripts/favBar

@ -52,7 +52,7 @@ if !(EPOCH_modKeys isequalto [_shift,_ctrl,_alt]) then {
//Favorites bar
if (_dikCode in [EPOCH_keysfav1,EPOCH_keysfav2,EPOCH_keysfav3,EPOCH_keysfav4,EPOCH_keysfav5]) then {
if (isnull EPOCH_Target) then {
_this call epoch_favBar_action;
_handled = _this call epoch_favBar_action;
} else {
"Can't use while in building mode!" call epoch_message;
};

@ -25,6 +25,7 @@ _tileIdx = switch (_kee) do {
};
_item = rmx_var_favBar_current select _tileIdx;
if (_item isequalto "") exitwith {false};
_throw = "";
{
if (_item in (getarray (_x >> "Magazines"))) exitwith {