nametags: slightly changed module options to use the new ACE_Settings

This commit is contained in:
Nicolás Badano 2015-02-03 15:47:17 -03:00
parent b119d5246b
commit 146e87f02e
5 changed files with 44 additions and 48 deletions

View File

@ -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;
};
};
};
};

View File

@ -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 <RscTitles.hpp>

View File

@ -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")};

View File

@ -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.";

View File

@ -58,9 +58,7 @@
<Hungarian>Játékosok rendfokozatának mutatása (névcímke szükséges)</Hungarian>
<Russian>Показать звания игроков (требует имен игроков)</Russian>
</Key>
</Package>
<Package name="CrewInfo">
<Key ID="STR_ACE_CrewInfo_ShowVehicleCrewInfo">
<Key ID="STR_ACE_NameTags_ShowVehicleCrewInfo">
<English>Show vehicle crew info</English>
<German>Zeige Fahrzeugbesatzung</German>
<Spanish>Mostrar tripulantes</Spanish>
@ -68,5 +66,8 @@
<Czech>Zobrazit info o posádce vozidla</Czech>
<Russian>Показать экипаж</Russian>
</Key>
<Key ID="STR_ACE_NameTags_ShowNamesForAI">
<English>Show name tags for AI units</English>
</Key>
</Package>
</Project>