2023-09-12 18:58:10 +00:00
|
|
|
#include "..\script_component.hpp"
|
2015-02-04 00:16:47 +00:00
|
|
|
/*
|
|
|
|
* Author: Garth 'L-H' de Wet
|
|
|
|
* Removes the specified speed dial from unit's speed dial.
|
|
|
|
*
|
|
|
|
* Arguments:
|
|
|
|
* 0: Speed dial name <STRING>
|
|
|
|
*
|
|
|
|
* Return Value:
|
|
|
|
* None
|
|
|
|
*
|
|
|
|
* Example:
|
|
|
|
* ["IED 1"] call ACE_explosives_fnc_removeFromSpeedDial;
|
|
|
|
*
|
|
|
|
* Public: Yes
|
|
|
|
*/
|
2015-08-15 19:35:33 +00:00
|
|
|
|
2016-09-04 14:44:22 +00:00
|
|
|
private _speedDial = ace_player getVariable [QGVAR(SpeedDial), []];
|
2015-02-04 00:16:47 +00:00
|
|
|
if (count _speedDial == 0) exitWith {};
|
|
|
|
{
|
2015-04-06 16:22:43 +00:00
|
|
|
if ((_x select 0) == (_this select 0)) exitWith {
|
2015-08-15 19:35:33 +00:00
|
|
|
_speedDial set [_forEachIndex, "x"];
|
2015-04-06 16:22:43 +00:00
|
|
|
_speedDial = _speedDial - ["x"];
|
|
|
|
ace_player setVariable [QGVAR(SpeedDial),_speedDial];
|
|
|
|
};
|
2015-08-15 19:35:33 +00:00
|
|
|
} forEach _speedDial;
|