From 77e62946aec7787047f9c19083fec7ad1b4477c9 Mon Sep 17 00:00:00 2001 From: Michael Braun Date: Wed, 5 Aug 2015 00:46:57 +0200 Subject: [PATCH] Updated parameterization in Interact_menu module. --- .../functions/fnc_addActionToClass.sqf | 2 +- .../functions/fnc_addActionToObject.sqf | 2 +- .../functions/fnc_collectActiveActionTree.sqf | 4 +- .../functions/fnc_compileMenu.sqf | 4 +- .../functions/fnc_compileMenuSelfAction.sqf | 4 +- .../functions/fnc_compileMenuZeus.sqf | 2 +- .../functions/fnc_createAction.sqf | 63 ++++++------------- .../functions/fnc_ctrlSetParsedTextCached.sqf | 6 +- .../functions/fnc_findActionNode.sqf | 6 +- .../functions/fnc_handlePlayerChanged.sqf | 2 +- .../interact_menu/functions/fnc_isSubPath.sqf | 2 +- .../interact_menu/functions/fnc_keyDown.sqf | 2 +- addons/interact_menu/functions/fnc_keyUp.sqf | 3 +- .../functions/fnc_removeActionFromClass.sqf | 4 +- .../functions/fnc_removeActionFromObject.sqf | 4 +- .../functions/fnc_renderActionPoints.sqf | 4 +- .../functions/fnc_renderBaseMenu.sqf | 4 +- .../functions/fnc_renderIcon.sqf | 3 +- .../functions/fnc_renderMenu.sqf | 6 +- .../functions/fnc_renderSelector.sqf | 2 +- .../functions/fnc_setupTextColors.sqf | 2 +- .../fnc_userActions_addHouseActions.sqf | 8 +-- .../fnc_userActions_getHouseActions.sqf | 24 +++---- 23 files changed, 67 insertions(+), 96 deletions(-) diff --git a/addons/interact_menu/functions/fnc_addActionToClass.sqf b/addons/interact_menu/functions/fnc_addActionToClass.sqf index 7a8278c72d..ef4dc94d9e 100644 --- a/addons/interact_menu/functions/fnc_addActionToClass.sqf +++ b/addons/interact_menu/functions/fnc_addActionToClass.sqf @@ -19,7 +19,7 @@ */ #include "script_component.hpp" -EXPLODE_4_PVT(_this,_objectType,_typeNum,_parentPath,_action); +params ["_objectType", "_typeNum", "_parentPath", "_action"]; // Ensure the config menu was compiled first if (_typeNum == 0) then { diff --git a/addons/interact_menu/functions/fnc_addActionToObject.sqf b/addons/interact_menu/functions/fnc_addActionToObject.sqf index 5c736a2da6..fd64c61dad 100644 --- a/addons/interact_menu/functions/fnc_addActionToObject.sqf +++ b/addons/interact_menu/functions/fnc_addActionToObject.sqf @@ -19,7 +19,7 @@ */ #include "script_component.hpp" -EXPLODE_4_PVT(_this,_object,_typeNum,_parentPath,_action); +params ["_object", "_typeNum", "_parentPath", "_action"]; private ["_varName","_actionList"]; _varName = [QGVAR(actions),QGVAR(selfActions)] select _typeNum; diff --git a/addons/interact_menu/functions/fnc_collectActiveActionTree.sqf b/addons/interact_menu/functions/fnc_collectActiveActionTree.sqf index 62d9ca1094..4da303f618 100644 --- a/addons/interact_menu/functions/fnc_collectActiveActionTree.sqf +++ b/addons/interact_menu/functions/fnc_collectActiveActionTree.sqf @@ -14,8 +14,8 @@ */ #include "script_component.hpp" -EXPLODE_3_PVT(_this,_object,_origAction,_parentPath); -EXPLODE_2_PVT(_origAction,_origActionData,_origActionChildren); +params ["_object", "_origAction", "_parentPath"]; +_origAction params ["_origActionData", "_origActionChildren"]; private ["_target","_player","_fullPath","_activeChildren","_dynamicChildren","_action","_actionData","_x"]; diff --git a/addons/interact_menu/functions/fnc_compileMenu.sqf b/addons/interact_menu/functions/fnc_compileMenu.sqf index cf4db7aab1..6dd4c5ee74 100644 --- a/addons/interact_menu/functions/fnc_compileMenu.sqf +++ b/addons/interact_menu/functions/fnc_compileMenu.sqf @@ -12,7 +12,7 @@ */ #include "script_component.hpp"; -EXPLODE_1_PVT(_this,_target); +params ["_target"]; private ["_objectType","_actionsVarName","_isMan"]; _objectType = _target; @@ -29,7 +29,7 @@ if !(isNil {missionNamespace getVariable [_actionsVarName, nil]}) exitWith {}; private "_recurseFnc"; _recurseFnc = { private ["_actions", "_displayName", "_distance", "_icon", "_statement", "_position", "_condition", "_showDisabled", "_enableInside", "_canCollapse", "_runOnHover", "_children", "_entry", "_entryCfg", "_insertChildren", "_modifierFunction"]; - EXPLODE_1_PVT(_this,_actionsCfg); + params ["_actionsCfg"]; _actions = []; { diff --git a/addons/interact_menu/functions/fnc_compileMenuSelfAction.sqf b/addons/interact_menu/functions/fnc_compileMenuSelfAction.sqf index a34c45f504..910b8893c6 100644 --- a/addons/interact_menu/functions/fnc_compileMenuSelfAction.sqf +++ b/addons/interact_menu/functions/fnc_compileMenuSelfAction.sqf @@ -12,7 +12,7 @@ */ #include "script_component.hpp"; -EXPLODE_1_PVT(_this,_target); +params ["_target"]; private ["_objectType","_actionsVarName","_isMan"]; _objectType = _target; @@ -30,7 +30,7 @@ private "_recurseFnc"; _recurseFnc = { private ["_actions", "_displayName", "_icon", "_statement", "_condition", "_showDisabled", "_enableInside", "_canCollapse", "_runOnHover", "_children", "_entry", "_entryCfg", "_insertChildren", "_modifierFunction"]; - EXPLODE_1_PVT(_this,_actionsCfg); + params ["_actionsCfg"]; _actions = []; { diff --git a/addons/interact_menu/functions/fnc_compileMenuZeus.sqf b/addons/interact_menu/functions/fnc_compileMenuZeus.sqf index 9dc212ac40..ef7c36abc9 100644 --- a/addons/interact_menu/functions/fnc_compileMenuZeus.sqf +++ b/addons/interact_menu/functions/fnc_compileMenuZeus.sqf @@ -19,7 +19,7 @@ private "_recurseFnc"; _recurseFnc = { private ["_actions", "_displayName", "_icon", "_statement", "_condition", "_showDisabled", "_enableInside", "_canCollapse", "_runOnHover", "_children", "_entry", "_entryCfg", "_insertChildren", "_modifierFunction"]; - EXPLODE_1_PVT(_this,_actionsCfg); + params ["_actionsCfg"]; _actions = []; { diff --git a/addons/interact_menu/functions/fnc_createAction.sqf b/addons/interact_menu/functions/fnc_createAction.sqf index 6845683044..256984c104 100644 --- a/addons/interact_menu/functions/fnc_createAction.sqf +++ b/addons/interact_menu/functions/fnc_createAction.sqf @@ -26,56 +26,31 @@ */ #include "script_component.hpp" -EXPLODE_5_PVT(_this,_actionName,_displayName,_icon,_statement,_condition); +params [ + "_actionName", + "_displayName", + "_icon", + "_statement", + "_condition", + ["_insertChildren", {}], + ["_customParams", []], + ["_position", {[0, 0, 0]}], + ["_distance", 2], + ["_params", [false, false, false, false, false]], + ["_modifierFunction", {}] +]; -// IGNORE_PRIVATE_WARNING(_target); -private ["_insertChildren","_customParams","_position","_distance","_params", "_modifierFunction"]; - -_insertChildren = if (count _this > 5) then { - _this select 5 -} else { - {} -}; - -_customParams = if (count _this > 6) then { - _this select 6 -} else { - [] -}; - -_position = if (count _this > 7) then { - if (typeName (_this select 7) == "STRING") then { +_position = if (typeName (_position) == "STRING") then { // If the action is set to a selection, create the suitable code - compile format ["_target selectionPosition '%1'", _this select 7]; + compile format ["_target selectionPosition '%1'", _position]; } else { - if (typeName (_this select 7) == "ARRAY") then { + if (typeName (_position) == "ARRAY") then { // If the action is set to a array position, create the suitable code - compile format ["%1", _this select 7]; + compile format ["%1", _position]; } else { - _this select 7 + _position; }; - } -} else { - {[0,0,0]} -}; - -_distance = if (count _this > 8) then { - _this select 8 -} else { - 2 -}; - -_params = if (count _this > 9) then { - _this select 9 -} else { - [false,false,false,false,false] -}; - -_modifierFunction = if (count _this > 10) then { - _this select 10 -} else { - {} -}; + }; [ _actionName, diff --git a/addons/interact_menu/functions/fnc_ctrlSetParsedTextCached.sqf b/addons/interact_menu/functions/fnc_ctrlSetParsedTextCached.sqf index b5d6a4e967..13b241e1d1 100644 --- a/addons/interact_menu/functions/fnc_ctrlSetParsedTextCached.sqf +++ b/addons/interact_menu/functions/fnc_ctrlSetParsedTextCached.sqf @@ -1,11 +1,7 @@ // by commy2 #include "script_component.hpp" -private ["_ctrl", "_index", "_text"]; - -_ctrl = _this select 0; -_index = _this select 1; -_text = _this select 2; +params ["_ctrl", "_index", "_text"]; //systemChat str (_text != ARR_SELECT(GVAR(ParsedTextCached),_index,"-1")); diff --git a/addons/interact_menu/functions/fnc_findActionNode.sqf b/addons/interact_menu/functions/fnc_findActionNode.sqf index b8639754d2..66738f6cf9 100644 --- a/addons/interact_menu/functions/fnc_findActionNode.sqf +++ b/addons/interact_menu/functions/fnc_findActionNode.sqf @@ -17,7 +17,7 @@ */ #include "script_component.hpp" -EXPLODE_2_PVT(_this,_actionTreeList,_parentPath); +params ["_actionTreeList", "_parentPath"]; private ["_parentNode", "_foundParentNode", "_fnc_findFolder", "_actionTree"]; @@ -31,10 +31,10 @@ _parentNode = [[],_actionTreeList]; _foundParentNode = false; _fnc_findFolder = { - EXPLODE_3_PVT(_this,_parentPath,_level,_actionNode); + params ["_parentPath", "_level", "_actionNode"]; { - EXPLODE_2_PVT(_x,_actionData,_actionChildren); + _x params ["_actionData", "_actionChildren"]; if ((_actionData select 0) isEqualTo (_parentPath select _level)) exitWith { if (count _parentPath == _level + 1) exitWith { diff --git a/addons/interact_menu/functions/fnc_handlePlayerChanged.sqf b/addons/interact_menu/functions/fnc_handlePlayerChanged.sqf index cb21d218db..a0962d7883 100644 --- a/addons/interact_menu/functions/fnc_handlePlayerChanged.sqf +++ b/addons/interact_menu/functions/fnc_handlePlayerChanged.sqf @@ -11,7 +11,7 @@ */ #include "script_component.hpp" -EXPLODE_2_PVT(_this,_newUnit,_oldUnit); +params ["_newUnit", "_oldUnit"]; // add to new unit private "_ehid"; diff --git a/addons/interact_menu/functions/fnc_isSubPath.sqf b/addons/interact_menu/functions/fnc_isSubPath.sqf index ec22b0aa9e..0a02fe2ea7 100644 --- a/addons/interact_menu/functions/fnc_isSubPath.sqf +++ b/addons/interact_menu/functions/fnc_isSubPath.sqf @@ -13,7 +13,7 @@ */ #include "script_component.hpp" -EXPLODE_2_PVT(_this,_longPath,_shortPath); +params ["_longPath", "_shortPath"]; private ["_isSubPath","_i"]; _isSubPath = true; diff --git a/addons/interact_menu/functions/fnc_keyDown.sqf b/addons/interact_menu/functions/fnc_keyDown.sqf index 5bf156b69e..ca06e25eb6 100644 --- a/addons/interact_menu/functions/fnc_keyDown.sqf +++ b/addons/interact_menu/functions/fnc_keyDown.sqf @@ -12,7 +12,7 @@ */ #include "script_component.hpp" -EXPLODE_1_PVT(_this,_menuType); +params ["_menuType"]; if (GVAR(openedMenuType) == _menuType) exitWith {true}; diff --git a/addons/interact_menu/functions/fnc_keyUp.sqf b/addons/interact_menu/functions/fnc_keyUp.sqf index 02e2d4db01..86580afa67 100644 --- a/addons/interact_menu/functions/fnc_keyUp.sqf +++ b/addons/interact_menu/functions/fnc_keyUp.sqf @@ -12,8 +12,7 @@ */ #include "script_component.hpp" -private "_calledByClicking"; -_calledByClicking = _this select 1; +params ["_menuType", "_calledByClicking"]; // Exit if there's no menu opened if (GVAR(openedMenuType) < 0) exitWith {true}; diff --git a/addons/interact_menu/functions/fnc_removeActionFromClass.sqf b/addons/interact_menu/functions/fnc_removeActionFromClass.sqf index 3959d7d0b1..c95f53f152 100644 --- a/addons/interact_menu/functions/fnc_removeActionFromClass.sqf +++ b/addons/interact_menu/functions/fnc_removeActionFromClass.sqf @@ -17,11 +17,11 @@ */ #include "script_component.hpp" -EXPLODE_3_PVT(_this,_objectType,_typeNum,_fullPath); +params ["_objectType", "_typeNum", "_fullPath"]; private ["_res","_varName","_actionTrees", "_parentNode", "_found"]; _res = _fullPath call FUNC(splitPath); -EXPLODE_2_PVT(_res,_parentPath,_actionName); +_res params ["_parentPath", "_actionName"]; _varName = format [[QGVAR(Act_%1), QGVAR(SelfAct_%1)] select _typeNum, _objectType]; _actionTrees = missionNamespace getVariable [_varName, []]; diff --git a/addons/interact_menu/functions/fnc_removeActionFromObject.sqf b/addons/interact_menu/functions/fnc_removeActionFromObject.sqf index bab740c578..e630bf4ad1 100644 --- a/addons/interact_menu/functions/fnc_removeActionFromObject.sqf +++ b/addons/interact_menu/functions/fnc_removeActionFromObject.sqf @@ -17,11 +17,11 @@ */ #include "script_component.hpp" -EXPLODE_3_PVT(_this,_object,_typeNum,_fullPath); +params ["_object", "_typeNum", "_fullPath"]; private ["_res","_varName","_actionList"]; _res = _fullPath call FUNC(splitPath); -EXPLODE_2_PVT(_res,_parentPath,_actionName); +_res params ["_parentPath", "_actionName"]; _varName = [QGVAR(actions),QGVAR(selfActions)] select _typeNum; _actionList = _object getVariable [_varName, []]; diff --git a/addons/interact_menu/functions/fnc_renderActionPoints.sqf b/addons/interact_menu/functions/fnc_renderActionPoints.sqf index 80bff14793..81a6887f97 100644 --- a/addons/interact_menu/functions/fnc_renderActionPoints.sqf +++ b/addons/interact_menu/functions/fnc_renderActionPoints.sqf @@ -78,7 +78,7 @@ _fnc_renderNearbyActions = { _fnc_renderLastFrameActions = { { - EXPLODE_3_PVT(_x,_target,_action,_objectActionList); + _x params ["_target", "_action", "_objectActionList"]; GVAR(objectActionList) = _objectActionList; [_target, _action] call FUNC(renderBaseMenu); @@ -176,6 +176,6 @@ if (count GVAR(collectedActionPoints) > 1) then { // Render the non-ocluded points { - EXPLODE_3_PVT(_x,_z,_sPos,_activeActionTree); + _x params ["_z", "_sPos", "_activeActionTree"]; [[], _activeActionTree, _sPos, [180,360]] call FUNC(renderMenu); } forEach GVAR(collectedActionPoints); diff --git a/addons/interact_menu/functions/fnc_renderBaseMenu.sqf b/addons/interact_menu/functions/fnc_renderBaseMenu.sqf index 5330bbebd2..a5ccabf3bf 100644 --- a/addons/interact_menu/functions/fnc_renderBaseMenu.sqf +++ b/addons/interact_menu/functions/fnc_renderBaseMenu.sqf @@ -18,8 +18,8 @@ BEGIN_COUNTER(fnc_renderBaseMenu) private ["_distance","_pos","_weaponDir","_ref","_sPos","_activeActionTree", "_line"]; -EXPLODE_2_PVT(_this,_object,_baseActionNode); -EXPLODE_1_PVT(_baseActionNode,_actionData); +params ["_object", "_baseActionNode"]; +_baseActionNode params ["_actionData"]; _distance = _actionData select 8; diff --git a/addons/interact_menu/functions/fnc_renderIcon.sqf b/addons/interact_menu/functions/fnc_renderIcon.sqf index 44a280a52e..ab909964de 100644 --- a/addons/interact_menu/functions/fnc_renderIcon.sqf +++ b/addons/interact_menu/functions/fnc_renderIcon.sqf @@ -16,7 +16,8 @@ #include "script_component.hpp" #define DEFAULT_ICON QUOTE(\z\ace\addons\interaction\ui\dot_ca.paa) private ["_ctrl", "_pos", "_displayNum"]; -PARAMS_4(_text,_icon,_sPos,_textSettings); + +params ["_text", "_icon", "_sPos", "_textSettings"]; //systemChat format ["Icon %1 - %2,%3", _text, _sPos select 0, _sPos select 1]; diff --git a/addons/interact_menu/functions/fnc_renderMenu.sqf b/addons/interact_menu/functions/fnc_renderMenu.sqf index a82b82dcb7..21c434fe03 100644 --- a/addons/interact_menu/functions/fnc_renderMenu.sqf +++ b/addons/interact_menu/functions/fnc_renderMenu.sqf @@ -17,9 +17,9 @@ private ["_menuInSelectedPath", "_path", "_menuDepth", "_x", "_offset", "_newPos", "_forEachIndex", "_player", "_pos", "_target", "_textSettings"]; -EXPLODE_4_PVT(_this,_parentPath,_action,_sPos,_angles); -EXPLODE_3_PVT(_action,_actionData,_activeChildren,_actionObject); -EXPLODE_2_PVT(_angles,_centerAngle,_maxAngleSpan); +params ["_parentPath", "_action", "_sPos", "_angles"]; +_action params ["_actionData", "_activeChildren", "_actionObject"]; +_angles params ["_centerAngle", "_maxAngleSpan"]; _menuDepth = (count GVAR(menuDepthPath)); diff --git a/addons/interact_menu/functions/fnc_renderSelector.sqf b/addons/interact_menu/functions/fnc_renderSelector.sqf index 96a495c715..17ded20903 100644 --- a/addons/interact_menu/functions/fnc_renderSelector.sqf +++ b/addons/interact_menu/functions/fnc_renderSelector.sqf @@ -13,7 +13,7 @@ */ #include "script_component.hpp" -EXPLODE_2_PVT(_this,_sPos,_icon); +params ["_sPos", "_icon"]; private ["_displayNum", "_ctrl", "_pos"]; diff --git a/addons/interact_menu/functions/fnc_setupTextColors.sqf b/addons/interact_menu/functions/fnc_setupTextColors.sqf index e54d529668..c23d68cfd3 100644 --- a/addons/interact_menu/functions/fnc_setupTextColors.sqf +++ b/addons/interact_menu/functions/fnc_setupTextColors.sqf @@ -16,7 +16,7 @@ private ["_menuDepth", "_mixColor", "_pathCount", "_row", "_shadowColor", "_text //Mixes 2 colors (number arrays) and makes a color string "#AARRGGBB" for structured text _mixColor = { - PARAMS_3(_color1,_color2,_ratio); + params ["_color1", "_color2", "_ratio"]; private ["_return", "_mix", "_index"]; _return = ""; for "_index" from 0 to 3 do { diff --git a/addons/interact_menu/functions/fnc_userActions_addHouseActions.sqf b/addons/interact_menu/functions/fnc_userActions_addHouseActions.sqf index 9143db0d4d..fdd7d14573 100644 --- a/addons/interact_menu/functions/fnc_userActions_addHouseActions.sqf +++ b/addons/interact_menu/functions/fnc_userActions_addHouseActions.sqf @@ -16,7 +16,7 @@ */ #include "script_component.hpp" -PARAMS_1(_interactionType); +params ["_interactionType"]; //Ignore if not enabled: if (!GVAR(addBuildingActions)) exitWith {}; @@ -27,8 +27,8 @@ if ((vehicle ACE_player) != ACE_player) exitWith {}; [{ private ["_nearBuidlings", "_typeOfHouse", "_houseBeingScaned", "_actionSet", "_memPoints", "_memPointsActions", "_helperPos", "_helperObject"]; - PARAMS_2(_args,_pfID); - EXPLODE_4_PVT(_args,_setPosition,_addedHelpers,_housesScaned,_housesToScanForActions); + params ["_args", "_pfID"]; + _args params ["_setPosition", "_addedHelpers", "_housesScaned", "_housesToScanForActions"]; if (!EGVAR(interact_menu,keyDown)) then { {deleteVehicle _x;} forEach _addedHelpers; @@ -75,7 +75,7 @@ if ((vehicle ACE_player) != ACE_player) exitWith {}; _housesScaned pushBack _houseBeingScaned; _actionSet = [_typeOfHouse] call FUNC(userActions_getHouseActions); - EXPLODE_2_PVT(_actionSet,_memPoints,_memPointsActions); + _actionSet params ["_memPoints", "_memPointsActions"]; // systemChat format ["Add Actions for [%1] (count %2) @ %3", _typeOfHouse, (count _memPoints), diag_tickTime]; { diff --git a/addons/interact_menu/functions/fnc_userActions_getHouseActions.sqf b/addons/interact_menu/functions/fnc_userActions_getHouseActions.sqf index 0b3d4347c7..dee82fd939 100644 --- a/addons/interact_menu/functions/fnc_userActions_getHouseActions.sqf +++ b/addons/interact_menu/functions/fnc_userActions_getHouseActions.sqf @@ -12,7 +12,7 @@ */ #include "script_component.hpp" -PARAMS_1(_typeOfBuilding); +params ["_typeOfBuilding"]; private["_action", "_actionDisplayName", "_actionDisplayNameDefault", "_actionMaxDistance", "_actionOffset", "_actionPath", "_actionPosition", "_building", "_configPath", "_endIndex", "_iconImage", "_index", "_ladders", "_memPointIndex", "_memPoints", "_memPointsActions", "_startIndex"]; @@ -24,7 +24,7 @@ _memPointsActions = []; //Get the offset for a memory point: _fnc_getMemPointOffset = { - PARAMS_1(_memoryPoint); + params ["_memoryPoint"]; _memPointIndex = _memPoints find _memoryPoint; _actionOffset = [0,0,0]; if (_memPointIndex == -1) then { @@ -38,14 +38,14 @@ _fnc_getMemPointOffset = { // Add UserActions for the building: _fnc_userAction_Statement = { - PARAMS_3(_target,_player,_variable); - EXPLODE_2_PVT(_variable,_actionStatement,_actionCondition); + params ["_target", "_player", "_variable"]; + _variable params ["_actionStatement", "_actionCondition"]; this = _target getVariable [QGVAR(building), objNull]; call _actionStatement; }; _fnc_userAction_Condition = { - PARAMS_3(_target,_player,_variable); - EXPLODE_2_PVT(_variable,_actionStatement,_actionCondition); + params ["_target", "_player", "_variable"]; + _variable params ["_actionStatement", "_actionCondition"]; this = _target getVariable [QGVAR(building), objNull]; if (isNull this) exitWith {false}; call _actionCondition; @@ -84,29 +84,29 @@ for "_index" from 0 to ((count _configPath) - 1) do { // Add Ladder Actions for the building: _fnc_ladder_ladderUp = { - PARAMS_3(_target,_player,_variable); - EXPLODE_1_PVT(_variable,_ladderIndex); + params ["_target", "_player", "_variable"]; + _variable params ["_ladderIndex"]; _building = _target getVariable [QGVAR(building), objNull]; TRACE_3("Ladder Action - UP",_player,_building,_ladderIndex); _player action ["LadderUp", _building, _ladderIndex, 0]; }; _fnc_ladder_ladderDown = { - PARAMS_3(_target,_player,_variable); - EXPLODE_1_PVT(_variable,_ladderIndex); + params ["_target", "_player", "_variable"]; + _variable params ["_ladderIndex"]; _building = _target getVariable [QGVAR(building), objNull]; TRACE_3("Ladder Action - Down",_player,_building,_ladderIndex); _player action ["LadderDown", _building, _ladderIndex, 1]; }; _fnc_ladder_conditional = { - PARAMS_2(_target,_player); + params ["_target", "_player"]; //(Check distance < 2) and (Don't show actions if on a ladder) ((_target distance _player) < 2) && {((getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animationState _player) >> "onLadder")) == 0)} }; _ladders = getArray (configFile >> "CfgVehicles" >> _typeOfBuilding >> "ladders"); { - EXPLODE_2_PVT(_x,_ladderBottomMemPoint,_ladderTopMemPoint); + _x params ["_ladderBottomMemPoint", "_ladderTopMemPoint"]; _actionMaxDistance = 3; //interact_menu will check head -> target's offset; leave this high and do a precice distance check in condition