mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
8f46ffd8d5
count -> forEach Co-authored-by: Grim <69561145+LinkIsGrim@users.noreply.github.com>
30 lines
565 B
Plaintext
30 lines
565 B
Plaintext
#include "..\script_component.hpp"
|
|
/*
|
|
* Author: Garth 'L-H' de Wet
|
|
* Gets the explosive from the speed dial entry.
|
|
*
|
|
* Arguments:
|
|
* 0: Speed dial entry <STRING>
|
|
*
|
|
* Return Value:
|
|
* Associated explosive (or ObjNull) <OBJECT>
|
|
*
|
|
* Example:
|
|
* ["2113"] call ace_explosives_fnc_getSpeedDialExplosive;
|
|
*
|
|
* Public: Yes
|
|
*/
|
|
|
|
params ["_code"];
|
|
TRACE_1("params",_code);
|
|
|
|
if (isNil QGVAR(CellphoneIEDs)) exitWith {[]};
|
|
private _explosive = [];
|
|
{
|
|
if ((_x select 1) == _code) exitWith {
|
|
_explosive = _x;
|
|
};
|
|
} forEach GVAR(CellphoneIEDs);
|
|
|
|
_explosive
|