2023-09-12 18:58:10 +00:00
|
|
|
#include "..\script_component.hpp"
|
2015-01-11 16:42:31 +00:00
|
|
|
/*
|
2018-09-22 03:54:24 +00:00
|
|
|
* Author: Garth 'L-H' de Wet, mharis001
|
|
|
|
* Checks if given unit has any placeable explosives on them.
|
2015-02-02 08:35:17 +00:00
|
|
|
*
|
|
|
|
* Arguments:
|
|
|
|
* 0: Unit <OBJECT>
|
|
|
|
*
|
|
|
|
* Return Value:
|
2018-09-22 03:54:24 +00:00
|
|
|
* Has explosives <BOOL>
|
2015-02-02 08:35:17 +00:00
|
|
|
*
|
|
|
|
* Example:
|
2018-09-22 03:54:24 +00:00
|
|
|
* [player] call ace_explosives_fnc_hasExplosives
|
2015-02-02 08:35:17 +00:00
|
|
|
*
|
|
|
|
* Public: Yes
|
|
|
|
*/
|
2015-04-29 05:05:02 +00:00
|
|
|
|
2015-08-15 19:35:33 +00:00
|
|
|
params ["_unit"];
|
|
|
|
TRACE_1("params",_unit);
|
|
|
|
|
2018-09-22 03:54:24 +00:00
|
|
|
private _cfgMagazines = configFile >> "CfgMagazines";
|
2017-10-10 14:39:59 +00:00
|
|
|
private _magazines = magazines _unit;
|
2015-01-11 16:42:31 +00:00
|
|
|
|
2018-09-22 03:54:24 +00:00
|
|
|
((_magazines arrayIntersect _magazines) findIf {getNumber (_cfgMagazines >> _x >> QGVAR(Placeable)) == 1}) > -1
|