From ccb3e65734c836be0286d2ecc84330d9502fd626 Mon Sep 17 00:00:00 2001 From: Fabio Schick <58027418+mrschick@users.noreply.github.com> Date: Thu, 4 Apr 2024 13:09:02 +0200 Subject: [PATCH] Map Tools - Show GPS on Map when equipped with UAV Terminal (#9885) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Show Map GPS when equipped with UAV Terminal * Update Maptools Documentation * Reword documentation * Reword docs, remove dash Co-authored-by: Jouni Järvinen * Allow GPS when terminal slot is not empty * Allow GPS on map when GPS sidepanel is available * Reword docs Co-authored-by: Grim <69561145+LinkIsGrim@users.noreply.github.com> * Return statement - remove ; and add comment Co-authored-by: Grim <69561145+LinkIsGrim@users.noreply.github.com> --------- Co-authored-by: Jouni Järvinen Co-authored-by: Grim <69561145+LinkIsGrim@users.noreply.github.com> --- addons/maptools/functions/fnc_canUseMapGPS.sqf | 10 +++++++--- docs/wiki/feature/maptools.md | 2 +- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/addons/maptools/functions/fnc_canUseMapGPS.sqf b/addons/maptools/functions/fnc_canUseMapGPS.sqf index 317eee6c42..0bdd0d0ea6 100644 --- a/addons/maptools/functions/fnc_canUseMapGPS.sqf +++ b/addons/maptools/functions/fnc_canUseMapGPS.sqf @@ -15,6 +15,10 @@ * Public: No */ -visibleMap && -{alive ACE_player} && -{"ItemGPS" in (assignedItems ACE_player)} +if (!visibleMap || {!alive ACE_player}) exitWith {false}; + +private _gpsOpened = visibleGPS; +private _gpsAvailable = openGPS true; +if (!_gpsOpened) then {openGPS false}; + +_gpsAvailable // return diff --git a/docs/wiki/feature/maptools.md b/docs/wiki/feature/maptools.md index f31c81f0e2..f8ce7e5416 100644 --- a/docs/wiki/feature/maptools.md +++ b/docs/wiki/feature/maptools.md @@ -25,7 +25,7 @@ This adds map tools that can be used to measure distances between two points or This adds a plotting board that can be used to aid in the rapid usage and adjustment of short-ranged indirect fires, as well as quick measurements of directions and distances between points, and general land-navigation. ### 1.4 GPS on map -If you are equipped with a vanilla GPS it will be shown on the map. (You don't need the `Map Tools` item in your inventory for this.) +If you have GPS capability, a GPS display will be shown on the map, indicating current grid position. (You don't need the `Map Tools` item in your inventory for this.) ## 2. Usage