ACE3/addons/common/functions/fnc_getConfigName.sqf
johnb432 fd5e56ffbc
Arsenal - Improved sorting, insignia detection, identity info verification and minor cleanup (#9795)
* Changed sorting + minor cleanup

* Update addons/arsenal/functions/fnc_fillLeftPanel.sqf

Co-authored-by: Grim <69561145+LinkIsGrim@users.noreply.github.com>

* check and log missing extended info

* fix extended loadout logging

* Made voice stuff config case

* use lowercase voice everywhere

* check loadout voice against configCase

* Update fnc_verifyLoadout.sqf

* Update addons/arsenal/functions/fnc_verifyLoadout.sqf

Co-authored-by: Grim <69561145+LinkIsGrim@users.noreply.github.com>

* Update addons/arsenal/functions/fnc_verifyLoadout.sqf

Co-authored-by: Grim <69561145+LinkIsGrim@users.noreply.github.com>

* Update addons/arsenal/functions/fnc_verifyLoadout.sqf

---------

Co-authored-by: LinkIsGrim <salluci.lovi@gmail.com>
Co-authored-by: Grim <69561145+LinkIsGrim@users.noreply.github.com>
2024-02-13 11:22:27 -08:00

31 lines
726 B
Plaintext

#include "..\script_component.hpp"
/*
* Author: johnb43
* Returns an item's config case sensitive name.
*
* Arguments:
* 0: Class name (item or object) <STRING>
*
* Return Value:
* Config case item name ("" if config is not found) <STRING>
*
* Example:
* ["arifle_AK12_F"] call ace_common_fnc_getConfigName
*
* Public: Yes
*/
params ["_className"];
(uiNamespace getVariable QGVAR(configNames)) getOrDefaultCall [toLowerANSI _className, {
private _config = configNull;
{
_config = configFile >> _x >> _className;
if (isClass _config) exitWith {};
} forEach ["CfgWeapons", "CfgMagazines", "CfgGlasses", "CfgVehicles", "CfgVoice", "CfgUnitInsignia"];
configName _config
}, true]