interact_menu: add canInteract (including exceptions) and canInteractWith to condition.

This commit is contained in:
Nicolás Badano 2015-01-20 02:41:04 -03:00
parent 9e11aeb0b9
commit b6dbd8d3c4

View File

@ -50,6 +50,10 @@ _recurseFnc = {
_statement = compile (getText (_entryCfg >> "statement")); _statement = compile (getText (_entryCfg >> "statement"));
_condition = getText (_entryCfg >> "condition"); _condition = getText (_entryCfg >> "condition");
if (_condition == "") then {_condition = "true"};
// Add canInteract (including exceptions) and canInteractWith to condition
_condition = _condition + format [QUOTE( && {%1 call EGVAR(common,canInteract)} && {[ARR_2(ACE_player, _target)] call EFUNC(common,canInteractWith)} ), getArray (_entryCfg >> "exceptions")];
_showDisabled = getNumber (_entryCfg >> "showDisabled"); _showDisabled = getNumber (_entryCfg >> "showDisabled");
_enableInside = getNumber (_entryCfg >> "enableInside"); _enableInside = getNumber (_entryCfg >> "enableInside");