ACE3/addons/explosives/functions/fnc_addTransmitterActions.sqf

42 lines
927 B
Plaintext
Raw Normal View History

#include "..\script_component.hpp"
/*
* Author: Garth 'L-H' de Wet
* Opens the UI for selecting the transmitter
*
* Arguments:
* 0: Unit <OBJECT>
*
* Return Value:
* None
*
* Example:
* [player] call ACE_Explosives_fnc_addTransmitterActions;
*
* Public: No
*/
2015-08-15 19:35:33 +00:00
params ["_unit"];
TRACE_1("params",_unit);
private _detonators = [_unit] call FUNC(getDetonators);
private _children = [];
{
private _config = ConfigFile >> "CfgWeapons" >> _x;
_children pushBack
[
[
format ["Trigger_%1", _forEachIndex],
getText(_config >> "displayName"),
getText(_config >> "picture"),
{},
{true},
{(_this select 2) call FUNC(addDetonateActions);},
2016-01-06 17:05:06 +00:00
[_unit,_x]
] call EFUNC(interact_menu,createAction),
[],
2016-01-06 17:05:06 +00:00
_unit
];
2015-08-15 19:35:33 +00:00
} forEach _detonators;
_children