ACE3/addons/explosives/functions/fnc_getDetonators.sqf
jonpas 742626ff1a
General - Relative script_component.hpp includes (#9378)
Co-authored-by: PabstMirror <pabstmirror@gmail.com>
2023-09-12 20:58:10 +02:00

23 lines
519 B
Plaintext

#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
*/
params ["_unit"];
TRACE_1("Getting detonators",_unit);
private _cfgWeapons = configFile >> "CfgWeapons";
(_unit call EFUNC(common,uniqueItems)) select {getNumber (_cfgWeapons >> _x >> QGVAR(Detonator)) == 1};