2015-01-11 16:42:31 +00:00
|
|
|
/*
|
2015-01-12 09:48:26 +00:00
|
|
|
Name: ACE_Explosives_fnc_getDetonators
|
|
|
|
|
2015-01-11 16:42:31 +00:00
|
|
|
Author(s):
|
|
|
|
Garth de Wet (LH)
|
2015-01-12 09:48:26 +00:00
|
|
|
|
2015-01-11 16:42:31 +00:00
|
|
|
Description:
|
|
|
|
Gets all the detonators of a specific unit
|
2015-01-12 09:48:26 +00:00
|
|
|
|
2015-01-11 16:42:31 +00:00
|
|
|
Parameters:
|
|
|
|
0: OBJECT - Unit to get detonators of
|
2015-01-12 09:48:26 +00:00
|
|
|
|
2015-01-11 16:42:31 +00:00
|
|
|
Returns:
|
|
|
|
ARRAY - Configs of all detonators.
|
2015-01-12 09:48:26 +00:00
|
|
|
|
2015-01-11 16:42:31 +00:00
|
|
|
Example:
|
2015-01-12 09:48:26 +00:00
|
|
|
_detonators = [player] call ACE_Explosives_fnc_getDetonators;
|
2015-01-11 16:42:31 +00:00
|
|
|
*/
|
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 = [];
|
|
|
|
|
|
|
|
{
|
|
|
|
_config = ConfigFile >> "CfgWeapons" >> _x;
|
2015-01-12 09:48:26 +00:00
|
|
|
if (getNumber (_config >> "ACE_Detonator") == 1) then {
|
2015-01-11 16:42:31 +00:00
|
|
|
_result pushBack _x;
|
|
|
|
};
|
|
|
|
} forEach _items;
|
|
|
|
|
|
|
|
_result
|