mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Cleanup
This commit is contained in:
parent
5bcc867bac
commit
eb5ac22b8d
@ -51,12 +51,8 @@ if (_unit == _attachToVehicle) then { //Self Attachment
|
||||
|
||||
[_unit, QGVAR(vehAttach), true] call EFUNC(common,setForceWalkStatus);
|
||||
|
||||
[{ //wait a frame to handle "Do When releasing action menu key"
|
||||
PARAMS_1(_unit);
|
||||
if (GVAR(placeAction) != PLACE_WAITING) exitWith {};
|
||||
[localize LSTRING(PlaceAction), ""] call EFUNC(interaction,showMouseHint);
|
||||
_unit setVariable [QGVAR(placeActionEH), [_unit, "DefaultAction", {true}, {GVAR(placeAction) = PLACE_APPROVE;}] call EFUNC(common,AddActionEventHandler)];
|
||||
}, [_unit]] call EFUNC(common,execNextFrame);
|
||||
[{[localize LSTRING(PlaceAction), ""] call EFUNC(interaction,showMouseHint)}, []] call EFUNC(common,execNextFrame);
|
||||
_unit setVariable [QGVAR(placeActionEH), [_unit, "DefaultAction", {true}, {GVAR(placeAction) = PLACE_APPROVE;}] call EFUNC(common,AddActionEventHandler)];
|
||||
|
||||
_actionID = _unit addAction [format ["<t color='#FF0000'>%1</t>", localize LSTRING(CancelAction)], {GVAR(placeAction) = PLACE_CANCEL}];
|
||||
|
||||
|
@ -30,7 +30,7 @@ _actions = [];
|
||||
if (getText (_item >> "ACE_Attachable") != "") then {
|
||||
_displayName = getText(_item >> "displayName");
|
||||
_picture = getText(_item >> "picture");
|
||||
_action = [_x, _displayName, _picture, {_this call FUNC(attach)}, {_this call FUNC(canAttach)}, {}, [_x]] call EFUNC(interact_menu,createAction);
|
||||
_action = [_x, _displayName, _picture, {[{_this call FUNC(attach)}, _this] call EFUNC(common,execNextFrame)}, {_this call FUNC(canAttach)}, {}, [_x]] call EFUNC(interact_menu,createAction);
|
||||
_actions pushBack [_action, [], _target];
|
||||
};
|
||||
};
|
||||
@ -43,7 +43,7 @@ _actions = [];
|
||||
if (getText (_item >> "ACE_Attachable") != "") then {
|
||||
_displayName = getText(_item >> "displayName");
|
||||
_picture = getText(_item >> "picture");
|
||||
_action = [_x, _displayName, _picture, {_this call FUNC(attach)}, {_this call FUNC(canAttach)}, {}, [_x]] call EFUNC(interact_menu,createAction);
|
||||
_action = [_x, _displayName, _picture, {[{_this call FUNC(attach)}, _this] call EFUNC(common,execNextFrame)}, {_this call FUNC(canAttach)}, {}, [_x]] call EFUNC(interact_menu,createAction);
|
||||
_actions pushBack [_action, [], _target];
|
||||
};
|
||||
};
|
||||
|
@ -123,7 +123,8 @@ class CfgVehicles {
|
||||
displayName = "$STR_ACE_ROLLWIRE";
|
||||
distance = 4;
|
||||
condition = "true";
|
||||
statement = QUOTE([ARR_2(_target,_player)] call FUNC(deploy));
|
||||
//wait a frame to handle "Do When releasing action menu key" option:
|
||||
statement = QUOTE([ARR_2({_this call FUNC(deploy)}, [ARR_2(_target,_player)])] call EFUNC(common,execNextFrame));
|
||||
showDisabled = 0;
|
||||
exceptions[] = {};
|
||||
priority = 5;
|
||||
|
@ -76,10 +76,9 @@ GVAR(deployPFH) = [{
|
||||
}, 0, [_wireNoGeo, _wireNoGeoPos, _unit]] call CBA_fnc_addPerFrameHandler;
|
||||
|
||||
[localize "STR_ACE_ROLLWIRE", "", ""] call EFUNC(interaction,showMouseHint);
|
||||
[{ //wait a frame to handle "Do When releasing action menu key" option
|
||||
GVAR(placer) setVariable [QGVAR(Deploy),
|
||||
[GVAR(placer), "DefaultAction",
|
||||
{GVAR(deployPFH) != -1},
|
||||
{GVAR(placer) setVariable [QGVAR(wireDeployed), true]}
|
||||
] call EFUNC(common,AddActionEventHandler)];
|
||||
}, _this] call EFUNC(common,execNextFrame);
|
||||
|
||||
GVAR(placer) setVariable [QGVAR(Deploy),
|
||||
[GVAR(placer), "DefaultAction",
|
||||
{GVAR(deployPFH) != -1},
|
||||
{GVAR(placer) setVariable [QGVAR(wireDeployed), true]}
|
||||
] call EFUNC(common,AddActionEventHandler)];
|
||||
|
@ -5,7 +5,8 @@ class CfgVehicles {
|
||||
class ACE_Sandbags {
|
||||
displayName = CSTRING(DeploySandbag);
|
||||
condition = QUOTE(call FUNC(canDeploy));
|
||||
statement = QUOTE(call FUNC(deploy));
|
||||
//wait a frame to handle "Do When releasing action menu key" option:
|
||||
statement = QUOTE([ARR_2({_this call FUNC(deploy)}, [])] call EFUNC(common,execNextFrame));
|
||||
exceptions[] = {"isNotSwimming"};
|
||||
showDisabled = 1;
|
||||
priority = 4;
|
||||
|
@ -34,17 +34,14 @@ GVAR(deployPFH) = [{
|
||||
|
||||
[localize LSTRING(ConfirmDeployment), localize LSTRING(CancelDeployment), localize LSTRING(ScrollAction)] call EFUNC(interaction,showMouseHint);
|
||||
|
||||
[{ //wait a frame to handle "Do When releasing action menu key" option
|
||||
GVAR(placer) setVariable [QGVAR(Deploy),
|
||||
[GVAR(placer), "DefaultAction",
|
||||
{GVAR(deployPFH) != -1 && !isNull (GVAR(sandBag))},
|
||||
{call FUNC(deployConfirm);}
|
||||
] call EFUNC(common,AddActionEventHandler)];
|
||||
GVAR(placer) setVariable [QGVAR(Deploy),
|
||||
[GVAR(placer), "DefaultAction",
|
||||
{GVAR(deployPFH) != -1 && !isNull (GVAR(sandBag))},
|
||||
{call FUNC(deployConfirm);}
|
||||
] call EFUNC(common,AddActionEventHandler)];
|
||||
|
||||
GVAR(placer) setVariable [QGVAR(Cancel),
|
||||
[GVAR(placer), "zoomtemp",
|
||||
{GVAR(deployPFH) != -1 && !isNull (GVAR(sandBag))},
|
||||
{call FUNC(deployCancel);}
|
||||
] call EFUNC(common,AddActionEventHandler)];
|
||||
|
||||
}, _this] call EFUNC(common,execNextFrame);
|
||||
GVAR(placer) setVariable [QGVAR(Cancel),
|
||||
[GVAR(placer), "zoomtemp",
|
||||
{GVAR(deployPFH) != -1 && !isNull (GVAR(sandBag))},
|
||||
{call FUNC(deployCancel);}
|
||||
] call EFUNC(common,AddActionEventHandler)];
|
||||
|
@ -82,7 +82,8 @@ class CfgVehicles {
|
||||
displayName = CSTRING(Position);
|
||||
distance = 4;
|
||||
condition = "true";
|
||||
statement = QUOTE([ARR_2(_target,_player)] call FUNC(positionTL));
|
||||
//wait a frame to handle "Do When releasing action menu key" option:
|
||||
statement = QUOTE([ARR_2({_this call FUNC(positionTL)}, [ARR_2(_target,_player)])] call EFUNC(common,execNextFrame));
|
||||
showDisabled = 0;
|
||||
exceptions[] = {};
|
||||
priority = 5;
|
||||
|
@ -39,17 +39,14 @@ GVAR(currentAngle) = 0;
|
||||
|
||||
[localize LSTRING(Deploy), localize LSTRING(Drop), localize LSTRING(Adjust)] call EFUNC(interaction,showMouseHint);
|
||||
|
||||
[{ //wait a frame to handle "Do When releasing action menu key" option
|
||||
ACE_player setVariable [QGVAR(Deploy),
|
||||
[ACE_player, "DefaultAction",
|
||||
{!isNull GVAR(ladder)},
|
||||
{GVAR(ladder) call FUNC(confirmTLdeploy);}
|
||||
] call EFUNC(common,AddActionEventHandler)];
|
||||
ACE_player setVariable [QGVAR(Deploy),
|
||||
[ACE_player, "DefaultAction",
|
||||
{!isNull GVAR(ladder)},
|
||||
{GVAR(ladder) call FUNC(confirmTLdeploy);}
|
||||
] call EFUNC(common,AddActionEventHandler)];
|
||||
|
||||
ACE_player setVariable [QGVAR(Cancel),
|
||||
[ACE_player, "zoomtemp",
|
||||
{!isNull GVAR(ladder)},
|
||||
{GVAR(ladder) call FUNC(cancelTLdeploy);}
|
||||
] call EFUNC(common,AddActionEventHandler)];
|
||||
|
||||
}, _this] call EFUNC(common,execNextFrame);
|
||||
ACE_player setVariable [QGVAR(Cancel),
|
||||
[ACE_player, "zoomtemp",
|
||||
{!isNull GVAR(ladder)},
|
||||
{GVAR(ladder) call FUNC(cancelTLdeploy);}
|
||||
] call EFUNC(common,AddActionEventHandler)];
|
||||
|
@ -17,7 +17,7 @@ class CfgVehicles {
|
||||
|
||||
class Item_Base_F;
|
||||
class ACE_Item_Tripod: Item_Base_F {
|
||||
author[] = {"Rocko", "Scubaman3D"};
|
||||
author[] = {"Rocko", "Scubaman3D"};
|
||||
scope = 2;
|
||||
scopeCurator = 2;
|
||||
displayName = CSTRING(DisplayName);
|
||||
@ -76,7 +76,8 @@ class CfgVehicles {
|
||||
displayName = CSTRING(Adjust);
|
||||
distance = 5;
|
||||
condition = "true";
|
||||
statement = QUOTE(_target call FUNC(adjust));
|
||||
//wait a frame to handle "Do When releasing action menu key" option:
|
||||
statement = QUOTE([ARR_2({_this call FUNC(adjust)}, [_target])] call EFUNC(common,execNextFrame));
|
||||
showDisabled = 0;
|
||||
exceptions[] = {};
|
||||
priority = 5;
|
||||
|
@ -36,11 +36,8 @@ GVAR(adjustPFH) = [{
|
||||
|
||||
[localize "STR_ACE_Tripod_Done", "", localize "STR_ACE_Tripod_ScrollAction"] call EFUNC(interaction,showMouseHint);
|
||||
|
||||
[{ //wait a frame to handle "Do When releasing action menu key" option
|
||||
if (!GVAR(adjusting)) exitWith {ERROR("Not Adjusting");};
|
||||
ACE_player setVariable [QGVAR(Adjust),
|
||||
[ACE_player, "DefaultAction",
|
||||
{GVAR(adjustPFH) != -1 && GVAR(adjusting)},
|
||||
{GVAR(adjusting) = false;}
|
||||
] call EFUNC(common,AddActionEventHandler)];
|
||||
}, _this] call EFUNC(common,execNextFrame);
|
||||
ACE_player setVariable [QGVAR(Adjust),
|
||||
[ACE_player, "DefaultAction",
|
||||
{GVAR(adjustPFH) != -1 && GVAR(adjusting)},
|
||||
{GVAR(adjusting) = false;}
|
||||
] call EFUNC(common,AddActionEventHandler)];
|
||||
|
Loading…
Reference in New Issue
Block a user