2015-01-11 16:42:31 +00:00
|
|
|
/*
|
2015-02-02 08:35:17 +00:00
|
|
|
* Author: Garth 'L-H' de Wet
|
|
|
|
* Whether the passed unit has any explosives on them.
|
|
|
|
*
|
|
|
|
* Arguments:
|
|
|
|
* 0: Unit <OBJECT>
|
|
|
|
*
|
|
|
|
* Return Value:
|
|
|
|
* The unit has explosives <BOOL>
|
|
|
|
*
|
|
|
|
* Example:
|
|
|
|
* _hasExplosives = [player] call ACE_Explosives_fnc_hasExplosives;
|
|
|
|
*
|
|
|
|
* Public: Yes
|
|
|
|
*/
|
2015-01-13 21:21:31 +00:00
|
|
|
#include "script_component.hpp"
|
2015-01-11 16:42:31 +00:00
|
|
|
private ["_unit", "_result", "_magazines"];
|
|
|
|
_result = false;
|
|
|
|
_unit = _this select 0;
|
|
|
|
_magazines = magazines _unit;
|
|
|
|
{
|
2015-04-06 16:22:43 +00:00
|
|
|
if (getNumber (ConfigFile >> "CfgMagazines" >> _x >> "ACE_Placeable") == 1) exitWith {
|
|
|
|
_result = true;
|
|
|
|
};
|
2015-01-11 16:42:31 +00:00
|
|
|
} count _magazines;
|
|
|
|
|
|
|
|
_result
|