Skip to content

Commit f2a7d9f

Browse files
authored
Add setting to hide if a unit is in a vehicle (#223)
1 parent d4e1ed6 commit f2a7d9f

File tree

3 files changed

+16
-1
lines changed

3 files changed

+16
-1
lines changed

addons/main/stringtable.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2065,6 +2065,12 @@
20652065
<Turkish>Eğer grubun birden fazla üyesi aynı araçta ise sadece 1 üye için ikon göster (genelde sürücü)</Turkish>
20662066
<Spanish>Muestra solo un ícono de su escuadrón si varios miembros están en el mismo vehículo, generalmente el conductor</Spanish>
20672067
</Key>
2068+
<Key ID="STR_dui_radar_enable_seat_icons">
2069+
<English>Enable Vehicle Seat Icons</English>
2070+
</Key>
2071+
<Key ID="STR_dui_radar_enable_seat_icons_desc">
2072+
<English>When enabled will show if a unit is in a vehicle or not.</English>
2073+
</Key>
20682074
<Key ID="STR_dui_radar_pointer_style">
20692075
<English>Pointer style</English>
20702076
<Chinesesimp>指向风格</Chinesesimp>

addons/radar/XEH_preInit.sqf

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -385,6 +385,15 @@ private _curCat = localize "STR_dui_cat_compass";
385385
,false
386386
] call CBA_fnc_addSetting;
387387

388+
[
389+
QGVAR(enable_seat_icons)
390+
,"CHECKBOX"
391+
,[localize "STR_dui_radar_enable_seat_icons", localize "STR_dui_radar_enable_seat_icons_desc"]
392+
,[CBA_SETTINGS_CAT, _curCat]
393+
,true
394+
,false
395+
] call CBA_fnc_addSetting;
396+
388397
GVAR(pointers) = [];
389398
if (isClass(configFile >> "CfgPatches" >> "ace_finger")) then {
390399
#include "include\getPointerStyles.sqf"

addons/radar/functions/fnc_getIcon.sqf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ if (!_forCompass && {GVAR(showRank)}) exitWith {
77
_namespace getVariable [rank _unit, DUI_RANK_PRIVATE];
88
};
99

10-
if !(isNull objectParent _unit || {_forCompass}) exitWith {
10+
if (GVAR(enable_seat_icons) && {!(isNull objectParent _unit || {_forCompass})}) exitWith {
1111
private _crewInfo = ((fullCrew (vehicle _unit)) select {_x select 0 isEqualTo _unit}) select 0;
1212
_crewInfo params ["", "_role", "", "", "_isTurret"];
1313

0 commit comments

Comments
 (0)