2018-09-17 19:19:29 +00:00
|
|
|
#include "script_component.hpp"
|
2015-01-11 16:42:31 +00:00
|
|
|
/*
|
2018-09-17 19:03:28 +00:00
|
|
|
* Author: Garth 'L-H' de Wet, mharis001
|
|
|
|
* Returns all detonators the given unit has.
|
2015-02-02 08:35:17 +00:00
|
|
|
*
|
|
|
|
* Arguments:
|
|
|
|
* 0: Unit <OBJECT>
|
|
|
|
*
|
|
|
|
* Return Value:
|
2018-09-17 19:03:28 +00:00
|
|
|
* Config names of detonators <ARRAY>
|
2015-02-02 08:35:17 +00:00
|
|
|
*
|
|
|
|
* Example:
|
2018-09-17 19:03:28 +00:00
|
|
|
* [_player] call ace_explosives_fnc_getDetonators
|
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"];
|
2018-09-17 19:03:28 +00:00
|
|
|
TRACE_1("Getting detonators",_unit);
|
2015-08-15 19:35:33 +00:00
|
|
|
|
2018-09-17 19:03:28 +00:00
|
|
|
private _cfgWeapons = configFile >> "CfgWeapons";
|
|
|
|
(_unit call EFUNC(common,uniqueItems)) select {getNumber (_cfgWeapons >> _x >> QGVAR(Detonator)) == 1};
|