mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
More nametag fixes / setSetting casting
This commit is contained in:
parent
ae65198ed8
commit
1b590bf0f9
@ -41,11 +41,11 @@ if ((typeName _value) != (_settingData select 1)) then {
|
||||
_failed = true;
|
||||
if ((_settingData select 1) == "BOOL" and (typeName _value) == "SCALAR") then {
|
||||
// If value is not 0 or 1 consider it invalid and don't set anything
|
||||
if (_value == 0) then {
|
||||
if (_value isEqualTo 0) then {
|
||||
_value = false;
|
||||
_failed = false;
|
||||
};
|
||||
if (_value == 1) then {
|
||||
if (_value isEqualTo 1) then {
|
||||
_value = true;
|
||||
_failed = false;
|
||||
};
|
||||
|
@ -21,17 +21,15 @@ class ACE_Settings {
|
||||
};
|
||||
class GVAR(showVehicleCrewInfo) {
|
||||
value = 1;
|
||||
typeName = "SCALAR";
|
||||
typeName = "BOOL";
|
||||
isClientSettable = 1;
|
||||
displayName = CSTRING(ShowVehicleCrewInfo);
|
||||
values[] = {CSTRING(DoNotForce), CSTRING(ForceHide), CSTRING(ForceShow)};
|
||||
};
|
||||
class GVAR(showNamesForAI) {
|
||||
value = 0;
|
||||
typeName = "SCALAR";
|
||||
typeName = "BOOL";
|
||||
isClientSettable = 1;
|
||||
displayName = CSTRING(ShowNamesForAI);
|
||||
values[] = {CSTRING(DoNotForce), CSTRING(ForceHide), CSTRING(ForceShow)};
|
||||
};
|
||||
class GVAR(showCursorTagForVehicles) {
|
||||
value = 0;
|
||||
|
@ -21,13 +21,17 @@ if !(_activated) exitWith {};
|
||||
GVAR(Module) = true;
|
||||
|
||||
[_logic, QGVAR(playerNamesViewDistance), "playerNamesViewDistance" ] call EFUNC(common,readSettingFromModule);
|
||||
[_logic, QGVAR(showNamesForAI), "showNamesForAI" ] call EFUNC(common,readSettingFromModule);
|
||||
[_logic, QGVAR(showVehicleCrewInfo), "showVehicleCrewInfo" ] call EFUNC(common,readSettingFromModule);
|
||||
[_logic, QGVAR(showCursorTagForVehicles), "showCursorTagForVehicles" ] call EFUNC(common,readSettingFromModule);
|
||||
|
||||
// Do Not Force - read module setting only non-default is set due to using SCALAR
|
||||
if ((_logic getVariable "showPlayerNames") != -1) then {
|
||||
[_logic, QGVAR(showPlayerNames), "showPlayerNames" ] call EFUNC(common,readSettingFromModule);
|
||||
};
|
||||
if ((_logic getVariable "showNamesForAI") != -1) then {
|
||||
[_logic, QGVAR(showNamesForAI), "showNamesForAI" ] call EFUNC(common,readSettingFromModule);
|
||||
};
|
||||
if ((_logic getVariable "showVehicleCrewInfo") != -1) then {
|
||||
[_logic, QGVAR(showVehicleCrewInfo), "showVehicleCrewInfo" ] call EFUNC(common,readSettingFromModule);
|
||||
};
|
||||
|
||||
diag_log text "[ACE]: NameTags Module Initialized.";
|
||||
|
Loading…
Reference in New Issue
Block a user