From ab31e9b9a7ba40a40a96befc1f51de3b59ba596f Mon Sep 17 00:00:00 2001 From: mrschick <58027418+mrschick@users.noreply.github.com> Date: Thu, 28 Mar 2024 14:33:46 +0100 Subject: [PATCH 1/8] Show Map GPS when equipped with UAV Terminal --- addons/maptools/functions/fnc_canUseMapGPS.sqf | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/addons/maptools/functions/fnc_canUseMapGPS.sqf b/addons/maptools/functions/fnc_canUseMapGPS.sqf index 317eee6c425..9b3b210d24c 100644 --- a/addons/maptools/functions/fnc_canUseMapGPS.sqf +++ b/addons/maptools/functions/fnc_canUseMapGPS.sqf @@ -15,6 +15,14 @@ * Public: No */ -visibleMap && -{alive ACE_player} && -{"ItemGPS" in (assignedItems ACE_player)} +if (!visibleMap || {!alive ACE_player}) exitWith {false}; + +private _playerTerminal = ACE_player getSlotItemName 612; +[ + "ItemGPS", + "B_UavTerminal", + "O_UavTerminal", + "I_UavTerminal", + "C_UavTerminal", + "I_E_UavTerminal" +] findIf { _x == _playerTerminal } != -1; From d2a016079ef30300de5dbd5bf45638b81adbe87e Mon Sep 17 00:00:00 2001 From: mrschick <58027418+mrschick@users.noreply.github.com> Date: Thu, 28 Mar 2024 18:06:37 +0100 Subject: [PATCH 2/8] Update Maptools Documentation --- docs/wiki/feature/maptools.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/wiki/feature/maptools.md b/docs/wiki/feature/maptools.md index f31c81f0e2c..2892760598c 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 are equipped with a vanilla GPS or UAV Terminal, a GPS display will be shown on the map. (You don't need the `Map Tools` item in your inventory for this.) ## 2. Usage From 3f35723988372d52fbf678445073f391ddddd844 Mon Sep 17 00:00:00 2001 From: mrschick <58027418+mrschick@users.noreply.github.com> Date: Thu, 28 Mar 2024 18:22:32 +0100 Subject: [PATCH 3/8] Reword documentation --- docs/wiki/feature/maptools.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/wiki/feature/maptools.md b/docs/wiki/feature/maptools.md index 2892760598c..4773dbaf7d8 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 or UAV Terminal, a GPS display will be shown on the map. (You don't need the `Map Tools` item in your inventory for this.) +If you are equipped with a vanilla GPS or UAV Terminal, 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 From 5ecff81c1d0121641c10f60ed59cff58cdb948a9 Mon Sep 17 00:00:00 2001 From: Fabio Schick <58027418+mrschick@users.noreply.github.com> Date: Thu, 28 Mar 2024 19:23:06 +0100 Subject: [PATCH 4/8] Reword docs, remove dash MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Jouni Järvinen --- docs/wiki/feature/maptools.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/wiki/feature/maptools.md b/docs/wiki/feature/maptools.md index 4773dbaf7d8..30f522ab73e 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 or UAV Terminal, 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.) +If you are equipped with a vanilla GPS or UAV Terminal, 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 From 00419ae1c43867bb381a2a812c692b42b7285cfc Mon Sep 17 00:00:00 2001 From: mrschick <58027418+mrschick@users.noreply.github.com> Date: Fri, 29 Mar 2024 00:47:10 +0100 Subject: [PATCH 5/8] Allow GPS when terminal slot is not empty --- addons/maptools/functions/fnc_canUseMapGPS.sqf | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/addons/maptools/functions/fnc_canUseMapGPS.sqf b/addons/maptools/functions/fnc_canUseMapGPS.sqf index 9b3b210d24c..5d5df955715 100644 --- a/addons/maptools/functions/fnc_canUseMapGPS.sqf +++ b/addons/maptools/functions/fnc_canUseMapGPS.sqf @@ -15,14 +15,6 @@ * Public: No */ -if (!visibleMap || {!alive ACE_player}) exitWith {false}; - -private _playerTerminal = ACE_player getSlotItemName 612; -[ - "ItemGPS", - "B_UavTerminal", - "O_UavTerminal", - "I_UavTerminal", - "C_UavTerminal", - "I_E_UavTerminal" -] findIf { _x == _playerTerminal } != -1; +visibleMap && +{alive ACE_player} && +{(ACE_player getSlotItemName 612) != ""} From fabc1fd0dad4c3da27bf81f9cf9fe0f4d5c6a9ab Mon Sep 17 00:00:00 2001 From: mrschick <58027418+mrschick@users.noreply.github.com> Date: Fri, 29 Mar 2024 01:20:15 +0100 Subject: [PATCH 6/8] Allow GPS on map when GPS sidepanel is available --- addons/maptools/functions/fnc_canUseMapGPS.sqf | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/addons/maptools/functions/fnc_canUseMapGPS.sqf b/addons/maptools/functions/fnc_canUseMapGPS.sqf index 5d5df955715..3fc83dc88e3 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} && -{(ACE_player getSlotItemName 612) != ""} +if (!visibleMap || {!alive ACE_player}) exitWith {false}; + +private _gpsOpened = visibleGPS; +private _gpsAvailable = openGPS true; +if (!_gpsOpened) then {openGPS false}; + +_gpsAvailable; From f1fde75a7a5fc5ffba46b5c90d862f8c7bc34fad Mon Sep 17 00:00:00 2001 From: Fabio Schick <58027418+mrschick@users.noreply.github.com> Date: Sat, 30 Mar 2024 17:24:30 +0100 Subject: [PATCH 7/8] Reword docs Co-authored-by: Grim <69561145+LinkIsGrim@users.noreply.github.com> --- docs/wiki/feature/maptools.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/wiki/feature/maptools.md b/docs/wiki/feature/maptools.md index 30f522ab73e..f8ce7e5416d 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 or UAV Terminal, 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.) +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 From 15c81f6e8b60e43a4cd96512e7a8a8bd8f7cda14 Mon Sep 17 00:00:00 2001 From: Fabio Schick <58027418+mrschick@users.noreply.github.com> Date: Sat, 30 Mar 2024 18:05:05 +0100 Subject: [PATCH 8/8] Return statement - remove ; and add comment Co-authored-by: Grim <69561145+LinkIsGrim@users.noreply.github.com> --- addons/maptools/functions/fnc_canUseMapGPS.sqf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/maptools/functions/fnc_canUseMapGPS.sqf b/addons/maptools/functions/fnc_canUseMapGPS.sqf index 3fc83dc88e3..0bdd0d0ea64 100644 --- a/addons/maptools/functions/fnc_canUseMapGPS.sqf +++ b/addons/maptools/functions/fnc_canUseMapGPS.sqf @@ -21,4 +21,4 @@ private _gpsOpened = visibleGPS; private _gpsAvailable = openGPS true; if (!_gpsOpened) then {openGPS false}; -_gpsAvailable; +_gpsAvailable // return