Arsenal - Optimize non-scope 2 mags filtering (#7543)

This commit is contained in:
jonpas 2020-02-22 22:26:55 +01:00 committed by GitHub
parent d63c7685b4
commit f6af95b4a1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -60,7 +60,7 @@ switch (GVAR(currentLeftPanel)) do {
private _cfgMags = configFile >> "CfgMagazines";
private _compatibleMags = ([_item, true] call CBA_fnc_compatibleMagazines) select { getNumber (_cfgMags >> _x >> "scope") == 2 };
GVAR(center) addWeapon _item;
if ((count _compatibleMags) > 0) then {
if !(_compatibleMags isEqualTo []) then {
GVAR(center) addWeaponItem [_item, [_compatibleMags select 0]];
};
@ -102,7 +102,7 @@ switch (GVAR(currentLeftPanel)) do {
private _cfgMags = configFile >> "CfgMagazines";
private _compatibleMags = ([_item, true] call CBA_fnc_compatibleMagazines) select { getNumber (_cfgMags >> _x >> "scope") == 2 };
GVAR(center) addWeapon _item;
if ((count _compatibleMags) > 0) then {
if !(_compatibleMags isEqualTo []) then {
GVAR(center) addWeaponItem [_item, [_compatibleMags select 0]];
};
@ -143,7 +143,7 @@ switch (GVAR(currentLeftPanel)) do {
private _cfgMags = configFile >> "CfgMagazines";
private _compatibleMags = ([_item, true] call CBA_fnc_compatibleMagazines) select { getNumber (_cfgMags >> _x >> "scope") == 2 };
GVAR(center) addWeapon _item;
if ((count _compatibleMags) > 0) then {
if !(_compatibleMags isEqualTo []) then {
GVAR(center) addWeaponItem [_item, [_compatibleMags select 0]];
};