diff --git a/addons/nametags/CfgVehicles.hpp b/addons/nametags/CfgVehicles.hpp index 444622f0ed..e3c4227834 100644 --- a/addons/nametags/CfgVehicles.hpp +++ b/addons/nametags/CfgVehicles.hpp @@ -15,40 +15,44 @@ class CfgVehicles { typeName = "NUMBER"; defaultValue = 5; }; - class ShowNamesForAI { + class showNamesForAI { displayName = "Show name tags for AI?"; - description = "Show the name and rank tags for friendly AI units? Default: No"; - typeName = "BOOL"; - class values { - class Yes { - name = "Yes"; - value = 1; - }; - class No { - default = 1; - name = "No"; - value = 0; - }; - }; - }; - class Visibility { - displayName = "Visibility of crew info"; - description = "Forces visibility of vehicle crew info, or by default allows players to choose it on their own. Default: Do Not Force"; - typeName = "INT"; + description = "Show the name and rank tags for friendly AI units? Default: Do not force"; + typeName = "NUMBER"; class values { class DoNotForce { default = 1; name = "Do Not Force"; + value = -1; + }; + class ForceHide { + name = "Force Hide"; + value = 0; + }; + class ForceShow { + name = "Force show"; + value = 1; + }; + }; + }; + class showVehicleCrewInfo { + displayName = "Show crew info?"; + description = "Show vehicle crew info, or by default allows players to choose it on their own. Default: Do Not Force"; + typeName = "NUMBER"; + class values { + class DoNotForce { + default = 1; + name = "Do Not Force"; + value = -1; + }; + class ForceHide { + name = "Force Hide"; value = 0; }; class ForceShow { name = "Force Show"; value = 1; }; - class ForceHide { - name = "Force Hide"; - value = -1; - }; }; }; }; diff --git a/addons/nametags/config.cpp b/addons/nametags/config.cpp index 58440192c0..aa55dd2aad 100644 --- a/addons/nametags/config.cpp +++ b/addons/nametags/config.cpp @@ -33,7 +33,13 @@ class ACE_Settings { value = 1; typeName = "BOOL"; isClientSetable = 1; - displayName = "$STR_ACE_CrewInfo_ShowVehicleCrewInfo"; + displayName = "$STR_ACE_NameTags_ShowVehicleCrewInfo"; + }; + class GVAR(showNamesForAI) { + value = 0; + typeName = "BOOL"; + isClientSetable = 1; + displayName = "$STR_ACE_NameTags_ShowNamesForAI"; }; class GVAR(PlayerNamesViewDistance) { @@ -46,16 +52,6 @@ class ACE_Settings { typeName = "SCALAR"; isClientSetable = 0; }; - class GVAR(CrewInfoVisibility) { - value = 0; - typeName = "BOOL"; - isClientSetable = 0; - }; - class GVAR(ShowNamesForAI) { - value = 0; - typeName = "BOOL"; - isClientSetable = 0; - }; }; #include diff --git a/addons/nametags/functions/fnc_canShow.sqf b/addons/nametags/functions/fnc_canShow.sqf index 8b61352def..0e187fee0f 100644 --- a/addons/nametags/functions/fnc_canShow.sqf +++ b/addons/nametags/functions/fnc_canShow.sqf @@ -1,12 +1,12 @@ /* Author: aeroson - + Description: Might be called several times a second - - Parameters: + + Parameters: None - + Returns: true if CrewInfo can be shown, false otherwise */ @@ -17,11 +17,6 @@ private["_player"]; _player = ACE_player; -// AGM_NameTags_ShowVehicleCrewInfo: -1 force NO, 0 doesnt care, 1 force YES - vehicle _player != _player && -{ - (GVAR(CrewInfoVisibility) == 1) || - (GVAR(CrewInfoVisibility) != -1 && GVAR(showVehicleCrewInfo)) -} && +{GVAR(ShowCrewInfo)} && {!(vehicle _player isKindOf "ParachuteBase")}; diff --git a/addons/nametags/functions/fnc_moduleNameTags.sqf b/addons/nametags/functions/fnc_moduleNameTags.sqf index 83087fc4ff..24b30e5d6b 100644 --- a/addons/nametags/functions/fnc_moduleNameTags.sqf +++ b/addons/nametags/functions/fnc_moduleNameTags.sqf @@ -24,6 +24,6 @@ GVAR(Module) = true; [_logic, QGVAR(PlayerNamesViewDistance), "PlayerNamesViewDistance" ] call EFUNC(common,readSettingFromModule); [_logic, QGVAR(ShowNamesForAI), "ShowNamesForAI" ] call EFUNC(common,readSettingFromModule); -[_logic, QGVAR(CrewInfoVisibility), "Visibility" ] call EFUNC(common,readSettingFromModule); +[_logic, QGVAR(showVehicleCrewInfo), "showVehicleCrewInfo" ] call EFUNC(common,readSettingFromModule); diag_log text "[ACE]: NameTags Module Initialized."; diff --git a/addons/nametags/stringtable.xml b/addons/nametags/stringtable.xml index 7d085b9d44..9cd99adaef 100644 --- a/addons/nametags/stringtable.xml +++ b/addons/nametags/stringtable.xml @@ -58,9 +58,7 @@ Játékosok rendfokozatának mutatása (névcímke szükséges) Показать звания игроков (требует имен игроков) - - - + Show vehicle crew info Zeige Fahrzeugbesatzung Mostrar tripulantes @@ -68,5 +66,8 @@ Zobrazit info o posádce vozidla Показать экипаж + + Show name tags for AI units +