mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Fixe bad search function
This commit is contained in:
parent
f3788afc89
commit
a3efede64f
@ -40,17 +40,19 @@ if (_onlyShotAmmoTypes) then {
|
|||||||
];
|
];
|
||||||
if (_ammo isEqualTo "" || {_ammo in _allAmmoConfigs}) exitWith {};
|
if (_ammo isEqualTo "" || {_ammo in _allAmmoConfigs}) exitWith {};
|
||||||
_allAmmoConfigs pushBack _ammo;
|
_allAmmoConfigs pushBack _ammo;
|
||||||
private _ammoConfig = configFile >> "CfgAmmo" >> _ammo;
|
private _submunitionConfig = configFile >> "CfgAmmo" >> _ammo >> "submunitionAmmo";
|
||||||
private _subMunition = toLowerANSI getText (_ammoConfig >> "submunitionAmmo");
|
if (isArray _submunitionConfig) then {
|
||||||
if (_subMunition isNotEqualTo "") then {
|
private _subMunition = getArray _submunitionConfig;
|
||||||
_subMunition = getArray (_ammoConfig >> "submunitionAmmo");
|
|
||||||
for "_i" from 0 to count _subMunition - 1 do {
|
for "_i" from 0 to count _subMunition - 1 do {
|
||||||
if (_i mod 2 == 0) then {
|
if (_i mod 2 == 0) then {
|
||||||
[toLowerANSI (_subMunition#_i)] call _configSearchFunc;
|
[toLowerANSI (_subMunition#_i)] call _configSearchFunc;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
} else {
|
} else {
|
||||||
[toLowerANSI _subMunition] call _configSearchFunc;
|
private _subMunition = getText _submunitionConfig;
|
||||||
|
if (_subMunition isNotEqualTo "") then {
|
||||||
|
[toLowerANSI _subMunition] call _configSearchFunc;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
private _allMagazineConfigs = configProperties [configFile >> "CfgMagazines", "isClass _x", true];
|
private _allMagazineConfigs = configProperties [configFile >> "CfgMagazines", "isClass _x", true];
|
||||||
@ -66,7 +68,7 @@ private _processedCfgAmmos = [];
|
|||||||
private _printCount = 0;
|
private _printCount = 0;
|
||||||
{ // Begin forEach to check each ammo type
|
{ // Begin forEach to check each ammo type
|
||||||
private _ammo = _x;
|
private _ammo = _x;
|
||||||
if (_ammo isNotEqualTo "" && {!(_ammo in _processedCfgAmmos)}) then {
|
if (_ammo isNotEqualTo "") then {
|
||||||
_processedCfgAmmos pushBack _ammo;
|
_processedCfgAmmos pushBack _ammo;
|
||||||
|
|
||||||
private _ammoConfig = configFile >> "CfgAmmo" >> _ammo;
|
private _ammoConfig = configFile >> "CfgAmmo" >> _ammo;
|
||||||
|
Loading…
Reference in New Issue
Block a user