mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Wirecutters - use new createAction system
This commit is contained in:
parent
24b47584a2
commit
1e2b47d6e7
@ -40,12 +40,12 @@ if (!("ACE_wirecutter" in (items ace_player))) exitWith {};
|
||||
if (((getPosASL ace_player) distance _setPosition) > 5) then {
|
||||
|
||||
_fncStatement = {
|
||||
_attachedFence = _target getVariable [QGVAR(attachedFence), objNull];
|
||||
[ace_player, _attachedFence] call FUNC(cutDownFence);
|
||||
PARAMS_3(_dummyTarget,_player,_attachedFence);
|
||||
[_player, _attachedFence] call FUNC(cutDownFence);
|
||||
};
|
||||
_fncCondition = {
|
||||
_attachedFence = _target getVariable [QGVAR(attachedFence), objNull];
|
||||
((!isNull _attachedFence) && {(damage _attachedFence) < 1} && {("ACE_wirecutter" in (items ace_player))})
|
||||
PARAMS_3(_dummyTarget,_player,_attachedFence);
|
||||
((!isNull _attachedFence) && {(damage _attachedFence) < 1} && {("ACE_wirecutter" in (items _player))})
|
||||
};
|
||||
|
||||
{
|
||||
@ -53,10 +53,10 @@ if (!("ACE_wirecutter" in (items ace_player))) exitWith {};
|
||||
if ([_x] call FUNC(isFence)) then {
|
||||
_fencesHelped pushBack _x;
|
||||
_helper = "Sign_Sphere25cm_F" createVehicleLocal (getpos _x);
|
||||
[_helper, 0, [""], (localize "STR_ACE_logistics_wirecutter_CutFence"), QUOTE(PATHTOF(ui\wirecutter_ca.paa)), [0,0,0], _fncStatement, _fncCondition, 5] call EFUNC(interact_menu,addAction);
|
||||
_action = [QGVAR(helperCutFence), (localize "STR_ACE_logistics_wirecutter_CutFence"), QUOTE(PATHTOF(ui\wirecutter_ca.paa)), _fncStatement, _fncCondition, {}, _x, [0,0,0], 5] call EFUNC(interact_menu,createAction);
|
||||
[_helper, 0, [],_action] call EFUNC(interact_menu,addActionToObject);
|
||||
_helper setPosASL ((getPosASL _x) vectorAdd [0,0,1.25]);
|
||||
_helper hideObject true;
|
||||
_helper setVariable [QGVAR(attachedFence), _x];
|
||||
_addedHelpers pushBack _helper;
|
||||
};
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user