ACE3/addons/explosives/functions/fnc_getSpeedDialExplosive.sqf
johnb432 8f46ffd8d5
General - Change count to forEach where appropriate (#9890)
count -> forEach

Co-authored-by: Grim <69561145+LinkIsGrim@users.noreply.github.com>
2024-04-04 08:15:26 -03:00

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