ACE3/addons/weaponselect/XEH_preInit.sqf

38 lines
983 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;
2015-01-17 17:26:51 +00:00
PREP(displayGrenadeTypeAndNumber);
PREP(fireSmokeLauncher);
PREP(playChangeFiremodeSound);
PREP(putWeaponAway);
2015-09-27 14:47:02 +00:00
PREP(selectNextGrenade);
2015-01-17 17:26:51 +00:00
PREP(selectWeaponMode);
PREP(selectWeaponMuzzle);
PREP(selectWeaponVehicle);
PREP(throwGrenade);
2015-09-27 15:15:59 +00:00
// collect frag and other grenades separately
GVAR(GrenadesAll) = [];
GVAR(GrenadesFrag) = [];
GVAR(GrenadesNonFrag) = [];
2015-01-17 17:26:51 +00:00
2015-09-27 15:15:59 +00:00
private ["_magazines", "_ammo", "_explosive"];
2015-01-17 17:26:51 +00:00
2015-09-27 15:15:59 +00:00
{
_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
{
_ammo = getText (configfile >> "CfgMagazines" >> _x >> "ammo");
_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;
false
} count _magazines;
false
} count getArray (configfile >> "CfgWeapons" >> "Throw" >> "muzzles");
2015-01-29 07:38:46 +00:00
ADDON = true;