diff --git a/addons/goggles/config.cpp b/addons/goggles/config.cpp index f804be003e..eafe07fb27 100644 --- a/addons/goggles/config.cpp +++ b/addons/goggles/config.cpp @@ -3,13 +3,13 @@ #define COLOUR 8.0 class CfgPatches { class ADDON { - units[] = {}; - weapons[] = {}; - requiredVersion = REQUIRED_VERSION; - requiredAddons[] = {"ace_common"}; - author[] = {"Garth 'L-H' de Wet"}; - authorUrl = "http://garth.snakebiteink.co.za/"; - VERSION_CONFIG; + units[] = {}; + weapons[] = {}; + requiredVersion = REQUIRED_VERSION; + requiredAddons[] = {"ace_common"}; + author[] = {"Garth 'L-H' de Wet"}; + authorUrl = "http://garth.snakebiteink.co.za/"; + VERSION_CONFIG; }; }; @@ -243,10 +243,12 @@ class SniperCloud { ACE_Goggles_BulletCount = 1; }; -class ACE_Options { +class ACE_Settings { class GVAR(showInThirdPerson) { - displayName = $STR_ACE_Goggles_ShowInThirdPerson; - default = 0; + value = 0; + typeName = "BOOL"; + isClientSetable = 1; + displayName = "$STR_ACE_Goggles_ShowInThirdPerson;" }; }; diff --git a/addons/goggles/functions/fnc_externalCamera.sqf b/addons/goggles/functions/fnc_externalCamera.sqf index 35b94171a6..91cc3f568c 100644 --- a/addons/goggles/functions/fnc_externalCamera.sqf +++ b/addons/goggles/functions/fnc_externalCamera.sqf @@ -19,5 +19,5 @@ #include "script_component.hpp" -if ((missionNameSpace getVariable [QGVAR(showInThirdPerson), 0]) == 1) exitWith { false }; +if (GVAR(showInThirdPerson)) exitWith { false }; (cameraView == "External") diff --git a/addons/hearing/config.cpp b/addons/hearing/config.cpp index 708146a89b..4499e647f6 100644 --- a/addons/hearing/config.cpp +++ b/addons/hearing/config.cpp @@ -22,9 +22,11 @@ class CfgPatches { #include "CfgAmmo.hpp" -class ACE_Options { - class GVAR(Hearing_DisableEarRinging) { - displayName = "$STR_ACE_Hearing_DisableEarRinging"; - default = 0; - }; +class ACE_Settings { + class GVAR(DisableEarRinging) { + default = 1; + typeName = "BOOL"; + isClientSetable = 1; + displayName = "$STR_ACE_Hearing_DisableEarRinging"; + }; }; \ No newline at end of file diff --git a/addons/hearing/functions/fnc_earRinging.sqf b/addons/hearing/functions/fnc_earRinging.sqf index 9279b6b954..b578dad979 100644 --- a/addons/hearing/functions/fnc_earRinging.sqf +++ b/addons/hearing/functions/fnc_earRinging.sqf @@ -25,7 +25,7 @@ GVAR(newStrength) = GVAR(newStrength) max _strength; if (missionNamespace getVariable [QGVAR(isEarRingingPlaying), false]) exitWith {}; -if (profileNamespace getVariable [QGVAR(DisableEarRinging), false]) exitWith {}; +if (QGVAR(DisableEarRinging)) exitWith {}; if (_strength > 0.75) exitWith { playSound "ACE_EarRinging_Heavy"; diff --git a/addons/interaction/XEH_clientInit.sqf b/addons/interaction/XEH_clientInit.sqf index bcc3f47def..a4474a5f3e 100644 --- a/addons/interaction/XEH_clientInit.sqf +++ b/addons/interaction/XEH_clientInit.sqf @@ -41,7 +41,7 @@ GVAR(isOpeningDoor) = false; _exceptions = ["ACE_Drag_isNotDragging", "ACE_Medical_canTreat", "ACE_Interaction_isNotEscorting", "ACE_Interaction_isNotSwimming"]; if !(_exceptions call EGVAR(common,canInteract)) exitWith {false}; // Conditions: specific - if !(!isNull (findDisplay 1713999) && {profileNamespace getVariable [QGVAR(AutoCloseMenu), 0] > 0}) exitWith {false}; + if !(!isNull (findDisplay 1713999) && {QGVAR(AutoCloseMenu)}) exitWith {false}; // Statement if (GVAR(MenuType) mod 2 == 0) then {call FUNC(onButtonUp)}; @@ -77,7 +77,7 @@ GVAR(isOpeningDoor) = false; _exceptions = ["ACE_Drag_isNotDragging", "ACE_Medical_canTreat", "ACE_Interaction_isNotEscorting", "ACE_Interaction_isNotSwimming"]; if !(_exceptions call EGVAR(common,canInteract)) exitWith {false}; // Conditions: specific - if !(!isNull (findDisplay 1713999) && {profileNamespace getVariable [QGVAR(AutoCloseMenu), 0] > 0}) exitWith {false}; + if !(!isNull (findDisplay 1713999) && {QGVAR(AutoCloseMenu)}) exitWith {false}; // Statement if (GVAR(MenuType) mod 2 == 1) then {call FUNC(onButtonUp)}; diff --git a/addons/interaction/config.cpp b/addons/interaction/config.cpp index 38933ef506..da62019d3a 100644 --- a/addons/interaction/config.cpp +++ b/addons/interaction/config.cpp @@ -18,22 +18,25 @@ class CfgPatches { #include -class ACE_Options { - class Interaction_FlowMenu { - displayName = "$STR_ACE_Interaction_FlowMenu"; - default = 0; - }; - class Interaction_AutoCloseMenu { - displayName = "$STR_ACE_Interaction_AutoCloseMenu"; - default = 0; - }; - class Interaction_AutoCenterCursor { - displayName = "$STR_ACE_Interaction_AutoCenterCursor"; - default = 1; - }; -}; - class ACE_Settings { + class GVAR(FlowMenu) { + value = 0; + typeName = "BOOL"; + isClientSetable = 1; + displayName = "$STR_ACE_Interaction_FlowMenu"; + }; + class GVAR(AutoCloseMenu) { + value = 0; + typeName = "BOOL"; + isClientSetable = 1; + displayName = "$STR_ACE_Interaction_AutoCloseMenu"; + }; + class GVAR(AutoCenterCursor) { + value = 1; + typeName = "BOOL"; + isClientSetable = 1; + displayName = "$STR_ACE_Interaction_AutoCenterCursor"; + }; class GVAR(EnableTeamManagement) { value = 1; typeName = "BOOL"; diff --git a/addons/interaction/functions/fnc_getActions2.sqf b/addons/interaction/functions/fnc_getActions2.sqf index ab64d8d390..0de4f7a534 100644 --- a/addons/interaction/functions/fnc_getActions2.sqf +++ b/addons/interaction/functions/fnc_getActions2.sqf @@ -66,7 +66,7 @@ _cacheIndices = _cache select 2; _statement = getText (_action >> "statement"); _statement = compile _statement; - if (profileNamespace getVariable ["ACE_Interaction_FlowMenu", false]) then { + if (GVAR(FlowMenu)) then { _statement = if (getText (_action >> "statement") == "" && {count _subMenu > 1}) then { compile format [QUOTE( call FUNC(hideMenu);if(%2 == 1)then{['%1'] call FUNC(openSubMenuSelf);}else{['%1'] call FUNC(openSubMenu);}; ), _subMenu select 0, _subMenu select 1]; } else { diff --git a/addons/interaction/functions/fnc_initialiseInteraction.sqf b/addons/interaction/functions/fnc_initialiseInteraction.sqf index 2637d28bf9..4d88eb4ea1 100644 --- a/addons/interaction/functions/fnc_initialiseInteraction.sqf +++ b/addons/interaction/functions/fnc_initialiseInteraction.sqf @@ -67,7 +67,7 @@ if (_this select 2) then { disableSerialization; _dlgInteractionDialog = uiNamespace getVariable QGVAR(Dialog); _ctrlInteractionDialog = _dlgInteractionDialog displayCtrl 3; - if (profileNamespace getVariable [QGVAR(AutoCenterCursor), true]) then {setMousePosition [0.5, 0.5]}; + if (GVAR(AutoCenterCursor)) then {setMousePosition [0.5, 0.5]}; if !(_subMenu) then { _ctrlInteractionDialog ctrlSetText ([_target] call EFUNC(common,getName)); } else { diff --git a/addons/movement/config.cpp b/addons/movement/config.cpp index e8661b748c..51ab97b80a 100644 --- a/addons/movement/config.cpp +++ b/addons/movement/config.cpp @@ -17,9 +17,11 @@ class CfgPatches { //#include "CfgInventoryGlobalVariable.hpp" #include "CfgMoves.hpp" -class ACE_Options { +class ACE_Settings { class GVAR(useImperial) { + value = 0; + typeName = "BOOL"; + isClientSetable = 1; displayName = "$STR_ACE_Movement_UseImperial"; - default = 0; }; }; diff --git a/addons/movement/functions/fnc_getWeight.sqf b/addons/movement/functions/fnc_getWeight.sqf index a52ed3cb12..254b706d56 100644 --- a/addons/movement/functions/fnc_getWeight.sqf +++ b/addons/movement/functions/fnc_getWeight.sqf @@ -7,7 +7,7 @@ _unit = _this select 0; _weight = loadAbs _unit * 0.1; -if (GETGVAR(useImperial, 0) == 1) then { +if (GVAR(useImperial)) then { _weight = format ["%1lb", (round (_weight * 100)) / 100]; } else { _weight = format ["%1kg", (round (_weight * FACTOR_POUND_TO_KILOGRAMM * 100)) / 100];