ACE3/addons/explosives/functions/fnc_getDetonators.sqf

23 lines
516 B
Plaintext
Raw Normal View History

#include "script_component.hpp"
/*
* Author: Garth 'L-H' de Wet, mharis001
* Returns all detonators the given unit has.
*
* Arguments:
* 0: Unit <OBJECT>
*
* Return Value:
* Config names of detonators <ARRAY>
*
* Example:
* [_player] call ace_explosives_fnc_getDetonators
*
* Public: Yes
*/
2015-04-29 05:05:02 +00:00
2015-08-15 19:35:33 +00:00
params ["_unit"];
TRACE_1("Getting detonators",_unit);
2015-08-15 19:35:33 +00:00
private _cfgWeapons = configFile >> "CfgWeapons";
(_unit call EFUNC(common,uniqueItems)) select {getNumber (_cfgWeapons >> _x >> QGVAR(Detonator)) == 1};