ACE3/addons/weaponselect/XEH_preInit.sqf
johnb432 8f46ffd8d5
General - Change count to forEach where appropriate (#9890)
count -> forEach

Co-authored-by: Grim <69561145+LinkIsGrim@users.noreply.github.com>
2024-04-04 08:15:26 -03:00

30 lines
797 B
Plaintext

#include "script_component.hpp"
ADDON = false;
PREP_RECOMPILE_START;
#include "XEH_PREP.hpp"
PREP_RECOMPILE_END;
// collect frag and other grenades separately
GVAR(GrenadesAll) = [];
GVAR(GrenadesFrag) = [];
GVAR(GrenadesNonFrag) = [];
{
private _magazines = getArray (configFile >> "CfgWeapons" >> "Throw" >> _x >> "magazines");
GVAR(GrenadesAll) append _magazines;
{
private _ammo = getText (configFile >> "CfgMagazines" >> _x >> "ammo");
private _explosive = getNumber (configFile >> "CfgAmmo" >> _ammo >> "explosive");
([GVAR(GrenadesFrag), GVAR(GrenadesNonFrag)] select (_explosive == 0)) pushBack _x;
} forEach _magazines;
} forEach getArray (configFile >> "CfgWeapons" >> "Throw" >> "muzzles");
#include "initSettings.inc.sqf"
ADDON = true;