2015-01-11 16:42:31 +00:00
|
|
|
/*
|
2015-02-02 08:35:17 +00:00
|
|
|
* Author: Garth 'L-H' de Wet
|
|
|
|
* Returns all the detonators of the unit
|
|
|
|
*
|
|
|
|
* Arguments:
|
|
|
|
* 0: Unit <OBJECT>
|
|
|
|
*
|
|
|
|
* Return Value:
|
|
|
|
* Configs of all detonators <ARRAY>
|
|
|
|
*
|
|
|
|
* Example:
|
|
|
|
* _detonators = [player] call ACE_Explosives_fnc_getDetonators;
|
|
|
|
*
|
|
|
|
* Public: Yes
|
|
|
|
*/
|
2015-01-13 21:21:31 +00:00
|
|
|
#include "script_component.hpp"
|
2015-01-11 16:42:31 +00:00
|
|
|
private ["_unit", "_items", "_result", "_config"];
|
|
|
|
_unit = _this select 0;
|
|
|
|
_items = (items _unit);
|
|
|
|
_result = [];
|
|
|
|
|
|
|
|
{
|
2015-04-06 16:22:43 +00:00
|
|
|
_config = ConfigFile >> "CfgWeapons" >> _x;
|
|
|
|
if (getNumber (_config >> "ACE_Detonator") == 1) then {
|
|
|
|
_result pushBack _x;
|
|
|
|
};
|
2015-01-11 16:42:31 +00:00
|
|
|
} forEach _items;
|
|
|
|
|
|
|
|
_result
|