diff --git a/addons/csw/functions/fnc_statTextCondition_tripods.sqf b/addons/csw/functions/fnc_statTextCondition_tripods.sqf index 87ac4ee41a7..f42bb52fc19 100644 --- a/addons/csw/functions/fnc_statTextCondition_tripods.sqf +++ b/addons/csw/functions/fnc_statTextCondition_tripods.sqf @@ -14,4 +14,4 @@ params ["_config"]; -(configProperties [configFile >> "CfgWeapons" >> configName _config >> QUOTE(ADDON) >> "assembleTo", "true", true]) isNotEqualTo [] +(configProperties [_config >> QUOTE(ADDON) >> "assembleTo", "true", true]) isNotEqualTo [] diff --git a/addons/csw/functions/fnc_statTextStatement_tripods.sqf b/addons/csw/functions/fnc_statTextStatement_tripods.sqf index 104d0763693..1f362c38e4b 100644 --- a/addons/csw/functions/fnc_statTextStatement_tripods.sqf +++ b/addons/csw/functions/fnc_statTextStatement_tripods.sqf @@ -17,7 +17,7 @@ params ["_config"]; private _cfgWeapons = configFile >> "CfgWeapons"; private _cfgVehicles = configFile >> "CfgVehicles"; -(configProperties [_cfgWeapons >> configName _config >> QUOTE(ADDON) >> "assembleTo", "true", true]) apply { +(configProperties [_config >> QUOTE(ADDON) >> "assembleTo", "true", true]) apply { private _tripod = getText (_cfgVehicles >> configName _x >> QUOTE(ADDON) >> "disassembleTo"); getText (_cfgWeapons >> _tripod >> "displayName") diff --git a/addons/interact_menu/functions/fnc_isSubPath.sqf b/addons/interact_menu/functions/fnc_isSubPath.sqf index e0f83b34449..a9fe6eddbca 100644 --- a/addons/interact_menu/functions/fnc_isSubPath.sqf +++ b/addons/interact_menu/functions/fnc_isSubPath.sqf @@ -4,28 +4,20 @@ * Check if the first path is a subpath of the other * * Arguments: - * 0: LongPath - * 1: ShortPath + * 0: Long path + * 1: Short path * * Return Value: * Bool * * Example: - * [[["ACE_SelfActions", player],["ace_Gestures", player]], [["ACE_SelfActions", player]]] call ace_interact_menu_fnc_isSubPath + * [[["ACE_SelfActions", player], ["ace_gestures", player]], [["ACE_SelfActions", player]]] call ace_interact_menu_fnc_isSubPath * * Public: No */ params ["_longPath", "_shortPath"]; -private _isSubPath = true; +private _shortPathLength = count _shortPath; -if (count _shortPath > count _longPath) exitWith {false}; - -for [{private _i = 0},{_i < count _shortPath},{_i = _i + 1}] do { - if ((_longPath select _i) isNotEqualTo (_shortPath select _i)) exitWith { - _isSubPath = false; - }; -}; - -_isSubPath +_shortPathLength <= count _longPath && {(_longPath select [0, _shortPathLength]) isEqualTo _shortPath} // return