ACE3/addons/maptools/functions/fnc_canUseMapGPS.sqf
PabstMirror a31608073e
Maptools - Fix gps detection (#10007)
* Maptools - Fix gps detection

* Use `infoPanelComponents`

Co-Authored-By: johnb432 <58661205+johnb432@users.noreply.github.com>

---------

Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com>
2024-05-21 18:25:59 -05:00

24 lines
485 B
Plaintext

#include "..\script_component.hpp"
/*
* Author: esteldunedain
* Returns if the GPS on the map can be used.
*
* Arguments:
* None
*
* Return Value:
* GPS can be used <BOOL>
*
* Example:
* call ace_maptools_fnc_canUseMapGPS
*
* Public: No
*/
if (!visibleMap || {!alive ACE_player}) exitWith {false};
private _panels = flatten (ACE_player infoPanelComponents "left");
private _index = _panels find "MinimapDisplayComponent";
_index != -1 && {_panels select (_index + 1)}