mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
use createAction
This commit is contained in:
parent
50a7990903
commit
074c1f8c88
@ -43,8 +43,8 @@ _wheelHitPointSelections = _wheelHitPointsWithSelections select 1;
|
||||
|
||||
private ["_nameRemove", "_nameReplace", "_icon", "_selection"];
|
||||
|
||||
_nameRemove = format ["Remove %1", _x];
|
||||
_nameReplace = format ["Replace %1", _x];
|
||||
_nameRemove = format ["Remove_%1", _x];
|
||||
_nameReplace = format ["Replace_%1", _x];
|
||||
|
||||
_icon = QUOTE(PATHTOF(ui\tire_ca.paa));
|
||||
|
||||
@ -84,8 +84,12 @@ _wheelHitPointSelections = _wheelHitPointsWithSelections select 1;
|
||||
_statement_replace = missionNamespace getVariable [_statement_replace, {}];
|
||||
_condition_replace = missionNamespace getVariable [_condition_replace, {}];
|
||||
|
||||
[_type, 0, [_nameRemove], [_nameRemove, _icon, _selection, _statement_remove, _condition_remove, 2]] call EFUNC(interact_menu,addActionToClass);
|
||||
[_type, 0, [_nameReplace], [_nameReplace, _icon, _selection, _statement_replace, _condition_replace, 2]] call EFUNC(interact_menu,addActionToClass);
|
||||
private "_action";
|
||||
_action = [_nameRemove, _nameRemove, _icon, _statement_remove, _condition_remove, {}, [], _selection, 2] call EFUNC(interact_menu,createAction);
|
||||
[_type, 0, [], _action] call EFUNC(interact_menu,addActionToClass);
|
||||
|
||||
_action = [_nameReplace, _nameReplace, _icon, _statement_replace, _condition_replace, {}, [], _selection, 2] call EFUNC(interact_menu,createAction);
|
||||
[_type, 0, [], _action] call EFUNC(interact_menu,addActionToClass);
|
||||
|
||||
} else {
|
||||
// exit if the hitpoint is in the blacklist, e.g. glasses
|
||||
@ -98,7 +102,7 @@ _wheelHitPointSelections = _wheelHitPointsWithSelections select 1;
|
||||
|
||||
private ["_name", "_icon", "_selection"];
|
||||
|
||||
_name = format ["Repair %1", _x];
|
||||
_name = format ["Repair_%1", _x];
|
||||
|
||||
_icon = "";
|
||||
|
||||
@ -124,7 +128,9 @@ _wheelHitPointSelections = _wheelHitPointsWithSelections select 1;
|
||||
_statement = missionNamespace getVariable [_statement, {}];
|
||||
_condition = missionNamespace getVariable [_condition, {}];
|
||||
|
||||
[_type, 0, ["ACE_MainActions", QGVAR(Repair), _name], [_name, _icon, _selection, _statement, _condition, 4]] call EFUNC(interact_menu,addActionToClass);
|
||||
private "_action";
|
||||
_action = [_name, _name, _icon, _statement, _condition, {}, [], _selection, 4] call EFUNC(interact_menu,createAction);
|
||||
[_type, 0, ["ACE_MainActions", QGVAR(Repair)], _action] call EFUNC(interact_menu,addActionToClass);
|
||||
|
||||
};
|
||||
} forEach _hitPoints;
|
||||
|
Loading…
Reference in New Issue
Block a user