This commit is contained in:
commy2 2016-03-06 07:14:43 +01:00
parent f43b287093
commit 8603f2062a

View File

@ -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;