Moved check for zero position in it's own line

This commit is contained in:
jonpas 2015-08-24 17:58:19 +02:00
parent 32d5ac99d9
commit 449af180c7

View File

@ -129,11 +129,12 @@ if (_type in _initializedClasses) exitWith {};
} else {
private "_action";
_action = [_name, _text, _icon, _statement, _condition, {}, [_x, "MiscRepair"], _selection, 4] call EFUNC(interact_menu,createAction);
[ _type,
0,
if (_selection isEqualTo [0, 0 ,0]) then { ["ACE_MainActions", QGVAR(Repair)] } else { [] }, // Put inside main actions if no other position was found above
_action
] call EFUNC(interact_menu,addActionToClass);
// Put inside main actions if no other position was found above
if (_selection isEqualTo [0, 0, 0]) then {
[_type, 0, ["ACE_MainActions", QGVAR(Repair)], _action] call EFUNC(interact_menu,addActionToClass);
} else {
[_type, 0, [], _action] call EFUNC(interact_menu,addActionToClass);
};
};
};
} forEach _hitPoints;