Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion addons/csw/functions/fnc_statTextCondition_tripods.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -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 []
2 changes: 1 addition & 1 deletion addons/csw/functions/fnc_statTextStatement_tripods.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
18 changes: 5 additions & 13 deletions addons/interact_menu/functions/fnc_isSubPath.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -4,28 +4,20 @@
* Check if the first path is a subpath of the other
*
* Arguments:
* 0: LongPath <ARRAY>
* 1: ShortPath <ARRAY>
* 0: Long path <ARRAY>
* 1: Short path <ARRAY>
*
* Return Value:
* Bool <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
Loading