From 2e6186c09bfc1c25aafe69bbba31ae90a2e4f9ea Mon Sep 17 00:00:00 2001 From: lambdatiger Date: Fri, 19 Jan 2024 13:32:22 -0600 Subject: [PATCH] Changed case output to match config --- addons/frag/functions/fnc_dev_debugAmmo.sqf | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/addons/frag/functions/fnc_dev_debugAmmo.sqf b/addons/frag/functions/fnc_dev_debugAmmo.sqf index c680d51017..35eb2eed70 100644 --- a/addons/frag/functions/fnc_dev_debugAmmo.sqf +++ b/addons/frag/functions/fnc_dev_debugAmmo.sqf @@ -40,25 +40,27 @@ if (_onlyShotAmmoTypes) then { ]; if (_ammo isEqualTo "" || {_ammo in _allAmmoConfigs}) exitWith {}; _allAmmoConfigs pushBack _ammo; - private _submunitionConfig = configFile >> "CfgAmmo" >> _ammo >> "submunitionAmmo"; + private _cfgAmmoRoot = configFile >> "CfgAmmo"; + private _submunitionConfig = _cfgAmmoRoot >> _ammo >> "submunitionAmmo"; if (isArray _submunitionConfig) then { private _subMunition = getArray _submunitionConfig; for "_i" from 0 to count _subMunition - 1 do { if (_i mod 2 == 0) then { - [toLowerANSI (_subMunition#_i)] call _configSearchFunc; + [configName (_cfgAmmoRoot >> (_subMunition#_i))] call _configSearchFunc; }; }; } else { private _subMunition = getText _submunitionConfig; if (_subMunition isNotEqualTo "") then { - [toLowerANSI _subMunition] call _configSearchFunc; + [configName (_cfgAmmoRoot >> _subMunition)] call _configSearchFunc; }; }; }; private _allMagazineConfigs = configProperties [configFile >> "CfgMagazines", "isClass _x", true]; - + private _cfgAmmoCfgPath = configFile >> "CfgAmmo"; { - [toLowerANSI getText (_x >> "ammo")] call _configSearchFunc; + private _magAmmo = getText (_x >> "ammo"); + [configName (_cfgAmmoCfgPath >> _magAmmo)] call _configSearchFunc; } forEach _allMagazineConfigs; } else { _allAmmoConfigs = configProperties [configFile >> "CfgAmmo", "isClass _x && !('ace_frag' in configName _x)", true] apply {configName _x};