mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
- Overhauls the spectator module entirely to share a similar UX to BI's "End Game Spectator" while maintaining some of the extended flexibility of ACE Spectator. - Simplifies spectator setup by reducing the number of settings. More advanced setup is still possible via the API functions provided.
40 lines
709 B
Plaintext
40 lines
709 B
Plaintext
/*
|
|
* Author: Nelson Duarte, SilentSpike
|
|
* Remove a location that can be seen in spectator view. Local effect.
|
|
*
|
|
* Arguments:
|
|
* 0: Unique ID <STRING>
|
|
*
|
|
* Return Value:
|
|
* Success <BOOL>
|
|
*
|
|
* Example:
|
|
* [_id] call ace_spectator_fnc_removeLocation
|
|
*
|
|
* Public: Yes
|
|
*/
|
|
|
|
#include "script_component.hpp"
|
|
|
|
params [["_id","",[""]]];
|
|
|
|
private _index = -1;
|
|
|
|
{
|
|
if ((_x select 0) == _id) exitWith {
|
|
_index = _forEachIndex;
|
|
};
|
|
} forEach GVAR(locationsList);
|
|
|
|
GVAR(locationsList) deleteAt _index;
|
|
|
|
// Update the list if appropriate
|
|
if !(isNull SPEC_DISPLAY) then {
|
|
if (GVAR(uiListType) == LIST_LOCATIONS) then {
|
|
[] call FUNC(ui_updateListLocations);
|
|
};
|
|
};
|
|
|
|
// Return
|
|
_index != -1
|