2023-07-07 04:14:35 +00:00
|
|
|
#include "script_component.hpp"
|
|
|
|
/*
|
2023-07-21 19:39:48 +00:00
|
|
|
* Author: LinkIsGrim
|
|
|
|
* Caches all item classnames used as field rations
|
2023-07-07 04:14:35 +00:00
|
|
|
*
|
|
|
|
* Arguments:
|
|
|
|
* None
|
|
|
|
*
|
|
|
|
* Return Value:
|
|
|
|
* None
|
|
|
|
*
|
|
|
|
* Example:
|
|
|
|
* call acex_field_rations_fnc_scanFieldRations
|
|
|
|
*
|
|
|
|
* Public: No
|
|
|
|
*/
|
|
|
|
|
|
|
|
private _list = createHashMap;
|
|
|
|
private _cfgWeapons = configFile >> "CfgWeapons";
|
|
|
|
private _cfgMagazines = configFile >> "CfgMagazines";
|
|
|
|
|
|
|
|
private _fnc_isFieldRationItem = toString {
|
|
|
|
(getNumber (_x >> "ACE_isFieldRationItem") isEqualTo 1) || {(getNumber (_x >> QXGVAR(thirstQuenched))) > 0} || {(getNumber (_x >> QXGVAR(hungerSatiated))) > 0} || {(getText (_x >> QXGVAR(refillItem))) isNotEqualTo ""}
|
|
|
|
};
|
|
|
|
|
|
|
|
{
|
|
|
|
_list set [configName _x, ""];
|
|
|
|
} forEach (_fnc_isFieldRationItem configClasses _cfgWeapons);
|
|
|
|
|
|
|
|
{
|
|
|
|
_list set [configName _x, ""];
|
|
|
|
} forEach (_fnc_isFieldRationItem configClasses _cfgMagazines);
|
|
|
|
|
|
|
|
uiNamespace setVariable [QXGVAR(fieldRationItems), compileFinal str _list];
|