diff --git a/addons/common/functions/fnc_canInteractWith.sqf b/addons/common/functions/fnc_canInteractWith.sqf index 4b4382a14e..7603452965 100644 --- a/addons/common/functions/fnc_canInteractWith.sqf +++ b/addons/common/functions/fnc_canInteractWith.sqf @@ -16,7 +16,7 @@ params ["_unit", "_target", ["_exceptions", []]]; -_exceptions = [_exceptions, {toLower _this}] call FUNC(map); +_exceptions = _exceptions apply {toLower _x}; private _owner = _target getVariable [QGVAR(owner), objNull]; diff --git a/addons/common/functions/fnc_checkFiles.sqf b/addons/common/functions/fnc_checkFiles.sqf index cdf5cb3d93..19a4c6f72a 100644 --- a/addons/common/functions/fnc_checkFiles.sqf +++ b/addons/common/functions/fnc_checkFiles.sqf @@ -21,8 +21,8 @@ ACE_LOGINFO_1("ACE is version %1.",_version); //private _addons = activatedAddons; // broken with High-Command module, see #2134 private _addons = "true" configClasses (configFile >> "CfgPatches");// -_addons = [_addons, {toLower configName _this}] call FUNC(map);// -_addons = [_addons, {_this find "ace_" == 0}] call FUNC(filter); +_addons = _addons apply {toLower configName _x};// +_addons = _addons select {_x find "ace_" == 0}; { if (getText (configFile >> "CfgPatches" >> _x >> "versionStr") != _version) then { @@ -63,7 +63,7 @@ _addons = [_addons, {_this find "ace_" == 0}] call FUNC(filter); /////////////// if (isMultiplayer) then { // don't check optional addons - _addons = [_addons, {getNumber (configFile >> "CfgPatches" >> _this >> "ACE_isOptional") != 1}] call FUNC(filter); + _addons = _addons select {getNumber (configFile >> "CfgPatches" >> _x >> "ACE_isOptional") != 1}; if (isServer) then { // send servers version of ACE to all clients diff --git a/addons/common/functions/fnc_filter.sqf b/addons/common/functions/fnc_filter.sqf index 36ff328ef0..acee28eaa2 100644 --- a/addons/common/functions/fnc_filter.sqf +++ b/addons/common/functions/fnc_filter.sqf @@ -9,15 +9,16 @@ * Return Value: * Final array * - * Usage: - * [[0,1,2,3,4], {_this > 2}] call FUNC(filter) ==> [3,4] - * * Public: Yes + * + * Deprecated */ #include "script_component.hpp" params [["_array", [], [[]]], ["_code", {}, [{}]]]; +ACE_DEPRECATED("ace_common_fnc_filter","3.7.0","select CODE"); + private _result = []; { diff --git a/addons/common/functions/fnc_getChildren.sqf b/addons/common/functions/fnc_getChildren.sqf index 19fdf287fe..f2930b015d 100644 --- a/addons/common/functions/fnc_getChildren.sqf +++ b/addons/common/functions/fnc_getChildren.sqf @@ -16,4 +16,4 @@ params ["_name", "_cfgClass"]; private _classes = format ["configName inheritsFrom _x == '%1'", _name] configClasses (configFile >> _cfgClass); -[_classes, {configName _this}] call FUNC(map) // return +_classes apply {configName _x} // return diff --git a/addons/common/functions/fnc_getVehicleUAVCrew.sqf b/addons/common/functions/fnc_getVehicleUAVCrew.sqf index fcb48ee216..2b2281ed10 100644 --- a/addons/common/functions/fnc_getVehicleUAVCrew.sqf +++ b/addons/common/functions/fnc_getVehicleUAVCrew.sqf @@ -14,4 +14,4 @@ params [["_vehicle", objNull, [objNull]]]; -[crew _vehicle, {getText (configFile >> "CfgVehicles" >> typeOf _this >> "simulation") == "UAVPilot"}] call FUNC(filter) // return +crew _vehicle select {getText (configFile >> "CfgVehicles" >> typeOf _x >> "simulation") == "UAVPilot"} // return diff --git a/addons/common/functions/fnc_map.sqf b/addons/common/functions/fnc_map.sqf index 5d24e13b38..ab9e61cba7 100644 --- a/addons/common/functions/fnc_map.sqf +++ b/addons/common/functions/fnc_map.sqf @@ -1,6 +1,6 @@ /* * Author: KoffeinFlummi, commy2 - * Applies given code to every element in an array, LIKE SOMETHING SQF SHOULD HAVE BY DEFAULT. + * Applies given code to every element in an array, LIKE SOMETHING SQF SHOULD HAVE BY DEFAULT. <- :kappa: * * Arguments: * 0: Array to be thingied. @@ -9,15 +9,16 @@ * Return Value: * Final array * - * Usage: - * [["2", "gobblecock", "25"], {parseNumber _this}] call FUNC(map) ==> [2, 0, 25] - * * Public: Yes + * + * Deprecated */ #include "script_component.hpp" params [["_array", [], [[]]], ["_code", {}, [{}]]]; +ACE_DEPRECATED("ace_common_fnc_filter","3.7.0","apply"); + // copy array to not alter the original one _array = + _array; diff --git a/addons/common/functions/fnc_removeSpecificMagazine.sqf b/addons/common/functions/fnc_removeSpecificMagazine.sqf index e703a56296..4ca5eec6d7 100644 --- a/addons/common/functions/fnc_removeSpecificMagazine.sqf +++ b/addons/common/functions/fnc_removeSpecificMagazine.sqf @@ -19,7 +19,7 @@ params [["_unit", objNull, [objNull]], ["_magazineType", "", [""]], ["_ammoCount private _isRemoved = false; // Check uniform -private _magazines = [magazinesAmmoCargo uniformContainer _unit, {_this select 0 == _magazineType}] call FUNC(filter); +private _magazines = magazinesAmmoCargo uniformContainer _unit select {_x select 0 == _magazineType}; private _index = _magazines find [_magazineType, _ammoCount]; if (_index > -1) exitWith { @@ -39,7 +39,7 @@ if (_index > -1) exitWith { }; // Check vest -_magazines = [magazinesAmmoCargo vestContainer _unit, {_this select 0 == _magazineType}] call FUNC(filter); +_magazines = magazinesAmmoCargo vestContainer _unit select {_x select 0 == _magazineType}; _index = _magazines find [_magazineType, _ammoCount]; if (_index > -1) exitWith { @@ -59,7 +59,7 @@ if (_index > -1) exitWith { }; // Check backpack -_magazines = [magazinesAmmoCargo backpackContainer _unit, {_this select 0 == _magazineType}] call FUNC(filter); +_magazines = magazinesAmmoCargo backpackContainer _unit select {_x select 0 == _magazineType}; _index = _magazines find [_magazineType, _ammoCount]; if (_index > -1) exitWith {