From ee04ea2f41b3583ecf31c4d55c402588eb1e3395 Mon Sep 17 00:00:00 2001 From: esteldunedain Date: Tue, 14 Apr 2015 20:21:11 -0300 Subject: [PATCH] Allow actions on coordinates instead of selections --- addons/interact_menu/functions/fnc_compileMenu.sqf | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/addons/interact_menu/functions/fnc_compileMenu.sqf b/addons/interact_menu/functions/fnc_compileMenu.sqf index a0b9b31dd4..e5b6e28c57 100644 --- a/addons/interact_menu/functions/fnc_compileMenu.sqf +++ b/addons/interact_menu/functions/fnc_compileMenu.sqf @@ -38,10 +38,17 @@ _recurseFnc = { _distance = getNumber (_entryCfg >> "distance"); _icon = getText (_entryCfg >> "icon"); _statement = compile (getText (_entryCfg >> "statement")); - _selection = getText (_entryCfg >> "selection"); - if (_selection == "") then { - _selection = [0,0,0]; + + _selection = ""; + if (isArray ( _entryCfg >> "selection" )) then { + _selection = getArray ( _entryCfg >> "selection" ) + } else { + _selection = getText (_entryCfg >> "selection") + if (_selection == "") then { + _selection = [0,0,0]; + }; }; + _condition = getText (_entryCfg >> "condition"); if (_condition == "") then {_condition = "true"};