From 021679208b0166ee2430c98f8c9283fc5e654f7b Mon Sep 17 00:00:00 2001 From: SAM Date: Thu, 14 May 2015 20:46:35 +0200 Subject: [PATCH] First batch of settings files Separating ACE_Settings.hpp from config.cpp --- addons/interaction/ACE_Settings.hpp | 6 ++++++ addons/interaction/config.cpp | 8 +------- addons/inventory/ACE_Settings.hpp | 10 ++++++++++ addons/inventory/config.cpp | 13 +------------ addons/microdagr/ACE_Settings.hpp | 7 +++++++ addons/microdagr/config.cpp | 9 +-------- addons/movement/ACE_Settings.hpp | 8 ++++++++ addons/movement/config.cpp | 10 +--------- addons/vehiclelock/ACE_Settings.hpp | 14 ++++++++++++++ addons/vehiclelock/config.cpp | 16 +--------------- addons/weaponselect/ACE_Settings.hpp | 9 +++++++++ addons/weaponselect/config.cpp | 11 +---------- 12 files changed, 60 insertions(+), 61 deletions(-) create mode 100644 addons/interaction/ACE_Settings.hpp create mode 100644 addons/inventory/ACE_Settings.hpp create mode 100644 addons/microdagr/ACE_Settings.hpp create mode 100644 addons/movement/ACE_Settings.hpp create mode 100644 addons/vehiclelock/ACE_Settings.hpp create mode 100644 addons/weaponselect/ACE_Settings.hpp diff --git a/addons/interaction/ACE_Settings.hpp b/addons/interaction/ACE_Settings.hpp new file mode 100644 index 0000000000..6c97109a37 --- /dev/null +++ b/addons/interaction/ACE_Settings.hpp @@ -0,0 +1,6 @@ +class ACE_Settings { + class GVAR(EnableTeamManagement) { + value = 1; + typeName = "BOOL"; + }; +}; diff --git a/addons/interaction/config.cpp b/addons/interaction/config.cpp index 7d10e1bef5..7a68b2c12a 100644 --- a/addons/interaction/config.cpp +++ b/addons/interaction/config.cpp @@ -15,10 +15,4 @@ class CfgPatches { #include "CfgEventHandlers.hpp" #include "CfgVehicles.hpp" #include "Menu_Config.hpp" - -class ACE_Settings { - class GVAR(EnableTeamManagement) { - value = 1; - typeName = "BOOL"; - }; -}; +#include "ACE_Settings.hpp" diff --git a/addons/inventory/ACE_Settings.hpp b/addons/inventory/ACE_Settings.hpp new file mode 100644 index 0000000000..9e1b7fc15a --- /dev/null +++ b/addons/inventory/ACE_Settings.hpp @@ -0,0 +1,10 @@ +class ACE_Settings { + class GVAR(inventoryDisplaySize) { + value = 0; + typeName = "SCALAR"; + isClientSettable = 1; + displayName = "$STR_ACE_Inventory_SettingName"; + description = "$STR_ACE_Inventory_SettingDescription"; + values[] = {"$str_medium", "$str_large", "$str_very_large"}; + }; +}; \ No newline at end of file diff --git a/addons/inventory/config.cpp b/addons/inventory/config.cpp index 622dacc624..1190525901 100644 --- a/addons/inventory/config.cpp +++ b/addons/inventory/config.cpp @@ -13,15 +13,4 @@ class CfgPatches { }; #include "RscDisplayInventory.hpp" - -class ACE_Settings { - class GVAR(inventoryDisplaySize) { - value = 0; - typeName = "SCALAR"; - isClientSettable = 1; - displayName = "$STR_ACE_Inventory_SettingName"; - description = "$STR_ACE_Inventory_SettingDescription"; - values[] = {"$str_medium", "$str_large", "$str_very_large"}; - }; -}; - +#include "ACE_Settings.hpp" diff --git a/addons/microdagr/ACE_Settings.hpp b/addons/microdagr/ACE_Settings.hpp new file mode 100644 index 0000000000..db175e7303 --- /dev/null +++ b/addons/microdagr/ACE_Settings.hpp @@ -0,0 +1,7 @@ +class ACE_Settings { + class GVAR(MapDataAvailable) { + value = 2; + typeName = "SCALAR"; + isClientSettable = 0; + }; +}; \ No newline at end of file diff --git a/addons/microdagr/config.cpp b/addons/microdagr/config.cpp index 4e459c126c..69032eafde 100644 --- a/addons/microdagr/config.cpp +++ b/addons/microdagr/config.cpp @@ -16,11 +16,4 @@ class CfgPatches { #include "CfgWeapons.hpp" #include "CfgVehicles.hpp" #include "gui.hpp" - -class ACE_Settings { - class GVAR(MapDataAvailable) { - value = 2; - typeName = "SCALAR"; - isClientSettable = 0; - }; -}; +#include "ACE_Settings.hpp" diff --git a/addons/movement/ACE_Settings.hpp b/addons/movement/ACE_Settings.hpp new file mode 100644 index 0000000000..05b38106f3 --- /dev/null +++ b/addons/movement/ACE_Settings.hpp @@ -0,0 +1,8 @@ +class ACE_Settings { + class GVAR(useImperial) { + value = 0; + typeName = "BOOL"; + isClientSettable = 1; + displayName = "$STR_ACE_Movement_UseImperial"; + }; +}; \ No newline at end of file diff --git a/addons/movement/config.cpp b/addons/movement/config.cpp index 6cf2c9470c..496e4982ac 100644 --- a/addons/movement/config.cpp +++ b/addons/movement/config.cpp @@ -16,12 +16,4 @@ class CfgPatches { #include "CfgFatigue.hpp" //#include "CfgInventoryGlobalVariable.hpp" #include "CfgMoves.hpp" - -class ACE_Settings { - class GVAR(useImperial) { - value = 0; - typeName = "BOOL"; - isClientSettable = 1; - displayName = "$STR_ACE_Movement_UseImperial"; - }; -}; +#include "ACE_Settings.hpp" diff --git a/addons/vehiclelock/ACE_Settings.hpp b/addons/vehiclelock/ACE_Settings.hpp new file mode 100644 index 0000000000..9eac505db2 --- /dev/null +++ b/addons/vehiclelock/ACE_Settings.hpp @@ -0,0 +1,14 @@ +class ACE_Settings { + class GVAR(DefaultLockpickStrength) { + value = 10; + typeName = "SCALAR"; + }; + class GVAR(LockVehicleInventory) { + value = 0; + typeName = "BOOL"; + }; + class GVAR(VehicleStartingLockState) { + value = -1; + typeName = "SCALAR"; + }; +}; \ No newline at end of file diff --git a/addons/vehiclelock/config.cpp b/addons/vehiclelock/config.cpp index 76d5817d8d..9ee1343bc8 100644 --- a/addons/vehiclelock/config.cpp +++ b/addons/vehiclelock/config.cpp @@ -12,21 +12,7 @@ class CfgPatches { }; }; -class ACE_Settings { - class GVAR(DefaultLockpickStrength) { - value = 10; - typeName = "SCALAR"; - }; - class GVAR(LockVehicleInventory) { - value = 0; - typeName = "BOOL"; - }; - class GVAR(VehicleStartingLockState) { - value = -1; - typeName = "SCALAR"; - }; -}; - +#include "ACE_Settings.hpp" #include "CfgEventHandlers.hpp" #include "CfgMagazines.hpp" #include "CfgVehicles.hpp" diff --git a/addons/weaponselect/ACE_Settings.hpp b/addons/weaponselect/ACE_Settings.hpp new file mode 100644 index 0000000000..34fdc809ea --- /dev/null +++ b/addons/weaponselect/ACE_Settings.hpp @@ -0,0 +1,9 @@ +class ACE_Settings { + class GVAR(DisplayText) { + typeName = "BOOL"; + isClientSettable = 1; + value = 1; + displayName = "$STR_ACE_Weaponselect_SettingDisplayTextName"; + description = "$STR_ACE_Weaponselect_SettingDisplayTextDesc"; + }; +}; diff --git a/addons/weaponselect/config.cpp b/addons/weaponselect/config.cpp index 68d0fe842d..231d167cd0 100644 --- a/addons/weaponselect/config.cpp +++ b/addons/weaponselect/config.cpp @@ -13,13 +13,4 @@ class CfgPatches { }; #include "CfgEventHandlers.hpp" - -class ACE_Settings { - class GVAR(DisplayText) { - typeName = "BOOL"; - isClientSettable = 1; - value = 1; - displayName = "$STR_ACE_Weaponselect_SettingDisplayTextName"; - description = "$STR_ACE_Weaponselect_SettingDisplayTextDesc"; - }; -}; +#include "ACE_Settings.hpp"