ACE3/addons/weaponselect/XEH_preInit.sqf

30 lines
797 B
Plaintext
Raw 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
2015-09-27 15:15:59 +00:00
{
2016-01-06 21:42:02 +00:00
private _magazines = getArray (configFile >> "CfgWeapons" >> "Throw" >> _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
{
2016-01-06 21:42:02 +00:00
private _ammo = getText (configFile >> "CfgMagazines" >> _x >> "ammo");
private _explosive = getNumber (configFile >> "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 (configFile >> "CfgWeapons" >> "Throw" >> "muzzles");
2015-01-29 07:38:46 +00:00
#include "initSettings.inc.sqf"
2015-01-29 07:38:46 +00:00
ADDON = true;