2018-09-17 19:19:29 +00:00
|
|
|
#include "script_component.hpp"
|
2015-02-04 00:16:47 +00:00
|
|
|
/*
|
|
|
|
* Author: Garth 'L-H' de Wet
|
2015-02-19 13:59:14 +00:00
|
|
|
* Gets the explosive from the speed dial entry.
|
2015-02-04 00:16:47 +00:00
|
|
|
*
|
|
|
|
* Arguments:
|
2015-02-19 13:59:14 +00:00
|
|
|
* 0: Speed dial entry <STRING>
|
2015-02-04 00:16:47 +00:00
|
|
|
*
|
|
|
|
* Return Value:
|
|
|
|
* Associated explosive (or ObjNull) <OBJECT>
|
|
|
|
*
|
|
|
|
* Example:
|
2015-02-19 13:59:14 +00:00
|
|
|
* ["2113"] call ace_explosives_fnc_getSpeedDialExplosive;
|
2015-02-04 00:16:47 +00:00
|
|
|
*
|
|
|
|
* Public: Yes
|
|
|
|
*/
|
2015-08-15 19:35:33 +00:00
|
|
|
|
|
|
|
params ["_code"];
|
|
|
|
TRACE_1("params",_code);
|
|
|
|
|
2015-02-19 13:59:14 +00:00
|
|
|
if (isNil QGVAR(CellphoneIEDs)) exitWith {[]};
|
2017-10-10 14:39:59 +00:00
|
|
|
private _explosive = [];
|
2015-02-04 00:16:47 +00:00
|
|
|
{
|
2015-04-06 20:20:11 +00:00
|
|
|
if ((_x select 1) == _code) exitWith {
|
|
|
|
_explosive = _x;
|
|
|
|
};
|
|
|
|
false
|
2015-02-04 00:16:47 +00:00
|
|
|
} count GVAR(CellphoneIEDs);
|
2015-08-15 19:35:33 +00:00
|
|
|
|
2015-02-04 00:16:47 +00:00
|
|
|
_explosive
|