mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
simplify
This commit is contained in:
parent
f43b287093
commit
8603f2062a
@ -22,27 +22,14 @@ private _fnc_addToCache = {
|
|||||||
GVAR(ItemKeyNamespace) setVariable [format ["%1:%2", _displayName, _picture], _this];
|
GVAR(ItemKeyNamespace) setVariable [format ["%1:%2", _displayName, _picture], _this];
|
||||||
};
|
};
|
||||||
|
|
||||||
// weapons and items
|
private _allItems = [];
|
||||||
{
|
|
||||||
if (getNumber (_x >> "scope") > 0) then {_x call _fnc_addToCache};
|
|
||||||
false
|
|
||||||
} count (
|
|
||||||
("true" configClasses (configFile >> "CfgWeapons")) +
|
|
||||||
("true" configClasses (configFile >> "CfgGlasses"))
|
|
||||||
);
|
|
||||||
|
|
||||||
// magazines
|
_allItems append ("getNumber (_x >> 'scope') > 0" configClasses (configFile >> "CfgWeapons"));
|
||||||
{
|
_allItems append ("getNumber (_x >> 'scope') > 0" configClasses (configFile >> "CfgGlasses"));
|
||||||
if (getNumber (_x >> "scope") == 2) then {_x call _fnc_addToCache};
|
_allItems append ("getNumber (_x >> 'scope') == 2" configClasses (configFile >> "CfgMagazines"));
|
||||||
false
|
_allItems append ("getNumber (_x >> 'scope') > 0 && {getNumber (_x >> 'isBackpack') == 1}" configClasses (configFile >> "CfgVehicles"));
|
||||||
} count ("true" configClasses (configFile >> "CfgMagazines"));
|
|
||||||
|
|
||||||
// backpacks
|
|
||||||
{
|
|
||||||
if (getNumber (_x >> "scope") > 0 && {getNumber (_x >> "isBackpack") == 1}) then {_x call _fnc_addToCache};
|
|
||||||
false
|
|
||||||
} count ("true" configClasses (configFile >> "CfgVehicles"));
|
|
||||||
|
|
||||||
|
{_x call _fnc_addToCache; false} count _allItems;
|
||||||
|
|
||||||
GVAR(customFilters) = [];
|
GVAR(customFilters) = [];
|
||||||
GVAR(selectedFilterIndex) = -1;
|
GVAR(selectedFilterIndex) = -1;
|
||||||
|
Loading…
Reference in New Issue
Block a user