From f2a7d9fef735fe54cbbd7831307378505baa00c0 Mon Sep 17 00:00:00 2001 From: diwako Date: Sat, 5 Oct 2024 17:00:01 +0200 Subject: [PATCH] Add setting to hide if a unit is in a vehicle (#223) --- addons/main/stringtable.xml | 6 ++++++ addons/radar/XEH_preInit.sqf | 9 +++++++++ addons/radar/functions/fnc_getIcon.sqf | 2 +- 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/addons/main/stringtable.xml b/addons/main/stringtable.xml index 0fd14f9..015539e 100644 --- a/addons/main/stringtable.xml +++ b/addons/main/stringtable.xml @@ -2065,6 +2065,12 @@ Eğer grubun birden fazla üyesi aynı araçta ise sadece 1 üye için ikon göster (genelde sürücü) Muestra solo un ícono de su escuadrón si varios miembros están en el mismo vehículo, generalmente el conductor + + Enable Vehicle Seat Icons + + + When enabled will show if a unit is in a vehicle or not. + Pointer style 指向风格 diff --git a/addons/radar/XEH_preInit.sqf b/addons/radar/XEH_preInit.sqf index 8d14af5..7501325 100644 --- a/addons/radar/XEH_preInit.sqf +++ b/addons/radar/XEH_preInit.sqf @@ -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" diff --git a/addons/radar/functions/fnc_getIcon.sqf b/addons/radar/functions/fnc_getIcon.sqf index c401833..5e82dbd 100644 --- a/addons/radar/functions/fnc_getIcon.sqf +++ b/addons/radar/functions/fnc_getIcon.sqf @@ -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"];