ACE3/addons/weaponselect/XEH_preInit.sqf

34 lines
869 B
Plaintext
Raw Permalink Normal View History

2015-01-17 17:26:51 +00:00
#include "script_component.hpp"
2015-01-29 07:38:46 +00:00
ADDON = false;
PREP_RECOMPILE_START;
2016-02-22 14:20:36 +00:00
#include "XEH_PREP.hpp"
PREP_RECOMPILE_END;
2015-01-17 17:26:51 +00:00
2015-09-27 15:15:59 +00:00
// collect frag and other grenades separately
2016-05-03 00:32:44 +00:00
GVAR(GrenadesAll) = [];
GVAR(GrenadesFrag) = [];
2015-09-27 15:15:59 +00:00
GVAR(GrenadesNonFrag) = [];
2015-01-17 17:26:51 +00:00
private _cfgMagazines = configFile >> "CfgMagazines";
private _cfgAmmo = configFile >> "CfgAmmo";
private _cfgThrow = configFile >> "CfgWeapons" >> "Throw";
2015-09-27 15:15:59 +00:00
{
private _magazines = getArray (_cfgThrow >> _x >> "magazines");
2015-01-17 17:26:51 +00:00
2015-09-27 15:15:59 +00:00
GVAR(GrenadesAll) append _magazines;
2015-09-27 14:47:02 +00:00
2015-09-27 15:15:59 +00:00
{
private _ammo = getText (_cfgMagazines >> _x >> "ammo");
private _explosive = getNumber (_cfgAmmo >> _ammo >> "explosive");
2015-01-17 17:26:51 +00:00
2015-09-27 15:15:59 +00:00
([GVAR(GrenadesFrag), GVAR(GrenadesNonFrag)] select (_explosive == 0)) pushBack _x;
} forEach _magazines;
} forEach getArray (_cfgThrow >> "muzzles");
2015-01-29 07:38:46 +00:00
#include "initSettings.inc.sqf"
2015-01-29 07:38:46 +00:00
ADDON = true;