From 1e2b47d6e7254ae672b7224ee7c032c5b02bd228 Mon Sep 17 00:00:00 2001 From: PabstMirror Date: Sun, 29 Mar 2015 12:08:01 -0500 Subject: [PATCH] Wirecutters - use new createAction system --- .../functions/fnc_interactEH.sqf | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/addons/logistics_wirecutter/functions/fnc_interactEH.sqf b/addons/logistics_wirecutter/functions/fnc_interactEH.sqf index 6012b1e0e2..6dace9c42d 100644 --- a/addons/logistics_wirecutter/functions/fnc_interactEH.sqf +++ b/addons/logistics_wirecutter/functions/fnc_interactEH.sqf @@ -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; }; };