From af0ab240403143739d5e9a353f24055f7828f330 Mon Sep 17 00:00:00 2001 From: PabstMirror Date: Thu, 26 Dec 2019 20:38:36 -0600 Subject: [PATCH] Tagging - Convert to CBA Settings (#7336) --- addons/tagging/ACE_Settings.hpp | 8 +------- addons/tagging/XEH_preInit.sqf | 2 ++ addons/tagging/initSettings.sqf | 9 +++++++++ 3 files changed, 12 insertions(+), 7 deletions(-) create mode 100644 addons/tagging/initSettings.sqf diff --git a/addons/tagging/ACE_Settings.hpp b/addons/tagging/ACE_Settings.hpp index a536718795..af9bca12d1 100644 --- a/addons/tagging/ACE_Settings.hpp +++ b/addons/tagging/ACE_Settings.hpp @@ -1,11 +1,5 @@ class ACE_Settings { class GVAR(quickTag) { - category = CSTRING(Tagging); - displayName = CSTRING(QuickTag); - description = CSTRING(QuickTagDesc); - typeName = "SCALAR"; - value = 1; - values[] = {ECSTRING(Common,Disabled), CSTRING(LastUsed), CSTRING(RandomX), CSTRING(Random)}; - isClientSettable = 1; + movedToSQF = 1; }; }; diff --git a/addons/tagging/XEH_preInit.sqf b/addons/tagging/XEH_preInit.sqf index e1487c671f..2f0e3158a6 100644 --- a/addons/tagging/XEH_preInit.sqf +++ b/addons/tagging/XEH_preInit.sqf @@ -9,4 +9,6 @@ PREP_RECOMPILE_END; GVAR(cachedTags) = []; GVAR(cachedRequiredItems) = []; +#include "initSettings.sqf" + ADDON = true; diff --git a/addons/tagging/initSettings.sqf b/addons/tagging/initSettings.sqf new file mode 100644 index 0000000000..c5d0fbfa42 --- /dev/null +++ b/addons/tagging/initSettings.sqf @@ -0,0 +1,9 @@ +[ + QGVAR(quickTag), "LIST", + [LLSTRING(QuickTag), LLSTRING(QuickTagDesc)], + ["ACE Uncategorized", LLSTRING(Tagging)], + [[0,1,2,3], [LELSTRING(Common,Disabled), LLSTRING(LastUsed), LLSTRING(RandomX), LLSTRING(Random)], 1], // [values, titles, defaultIndex] + false, // isGlobal + {[QGVAR(quickTag), _this] call EFUNC(common,cbaSettings_settingChanged)}, + false // Needs mission restart +] call CBA_settings_fnc_init;