Skip to content

Commit

Permalink
Add setting to hide if a unit is in a vehicle (#223)
Browse files Browse the repository at this point in the history
  • Loading branch information
diwako authored Oct 5, 2024
1 parent d4e1ed6 commit f2a7d9f
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
6 changes: 6 additions & 0 deletions addons/main/stringtable.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2065,6 +2065,12 @@
<Turkish>Eğer grubun birden fazla üyesi aynı araçta ise sadece 1 üye için ikon göster (genelde sürücü)</Turkish>
<Spanish>Muestra solo un ícono de su escuadrón si varios miembros están en el mismo vehículo, generalmente el conductor</Spanish>
</Key>
<Key ID="STR_dui_radar_enable_seat_icons">
<English>Enable Vehicle Seat Icons</English>
</Key>
<Key ID="STR_dui_radar_enable_seat_icons_desc">
<English>When enabled will show if a unit is in a vehicle or not.</English>
</Key>
<Key ID="STR_dui_radar_pointer_style">
<English>Pointer style</English>
<Chinesesimp>指向风格</Chinesesimp>
Expand Down
9 changes: 9 additions & 0 deletions addons/radar/XEH_preInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -385,6 +385,15 @@ private _curCat = localize "STR_dui_cat_compass";
,false
] call CBA_fnc_addSetting;

[
QGVAR(enable_seat_icons)
,"CHECKBOX"
,[localize "STR_dui_radar_enable_seat_icons", localize "STR_dui_radar_enable_seat_icons_desc"]
,[CBA_SETTINGS_CAT, _curCat]
,true
,false
] call CBA_fnc_addSetting;

GVAR(pointers) = [];
if (isClass(configFile >> "CfgPatches" >> "ace_finger")) then {
#include "include\getPointerStyles.sqf"
Expand Down
2 changes: 1 addition & 1 deletion addons/radar/functions/fnc_getIcon.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ if (!_forCompass && {GVAR(showRank)}) exitWith {
_namespace getVariable [rank _unit, DUI_RANK_PRIVATE];
};

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

Expand Down

0 comments on commit f2a7d9f

Please sign in to comment.