From cdd631f5a3bbadb7679447bb283058c4dd6f5f55 Mon Sep 17 00:00:00 2001 From: Steven Jackson Date: Tue, 14 Oct 2014 18:56:17 -0500 Subject: [PATCH] 5.0.3 --- .../LibSuperVillain-1.0/LibSuperVillain-1.0.lua | 13 +++++-------- Interface/AddOns/SVUI_CraftOMatic/Loader.lua | 4 ++-- .../AddOns/SVUI_CraftOMatic/SVUI_CraftOMatic.lua | 19 +++++++++++++++++++ 3 files changed, 26 insertions(+), 10 deletions(-) diff --git a/Interface/AddOns/SVUI/libs/LibSuperVillain-1.0/LibSuperVillain-1.0.lua b/Interface/AddOns/SVUI/libs/LibSuperVillain-1.0/LibSuperVillain-1.0.lua index eba8b48..fc3bd43 100644 --- a/Interface/AddOns/SVUI/libs/LibSuperVillain-1.0/LibSuperVillain-1.0.lua +++ b/Interface/AddOns/SVUI/libs/LibSuperVillain-1.0/LibSuperVillain-1.0.lua @@ -314,14 +314,11 @@ local function LiveProfileChange() if(LastKey ~= SOURCE_KEY) then --construct core dataset - local db = setmetatable({}, meta_database) - db.data = PROFILE_SV.STORED[SOURCE_KEY] - db.defaults = CoreObject.configs - CoreObject.db = db - - local cache = setmetatable({}, meta_cache) - cache.data = CACHE_SV.STORED[SOURCE_KEY] - CoreObject.cache = cache + local db = rawget(CoreObject.db, "data") + db = PROFILE_SV.STORED[SOURCE_KEY] + + local cache = rawget(CoreObject.cache, "data") + cache = CACHE_SV.STORED[SOURCE_KEY] if(CoreObject.ReLoad) then CoreObject:ReLoad() diff --git a/Interface/AddOns/SVUI_CraftOMatic/Loader.lua b/Interface/AddOns/SVUI_CraftOMatic/Loader.lua index b7bdd81..06b83d3 100644 --- a/Interface/AddOns/SVUI_CraftOMatic/Loader.lua +++ b/Interface/AddOns/SVUI_CraftOMatic/Loader.lua @@ -82,8 +82,8 @@ SV.Options.args.plugins.args.pluginOptions.args[Schema].args["fishing"] = { order = 1, name = L['AutoEquip'], desc = L['Enable/Disable automatically equipping fishing gear.'], - get = function(key)return SV.db[Schema].fishing[key[#key]]end, - set = function(key, value)PLUGIN:ChangeDBVar(value, key[#key], "fishing")end + get = function(key)return SV.db[Schema].fishing[key[#key]] end, + set = function(key, value)PLUGIN:ChangeDBVar(value, key[#key], "fishing") end } } } diff --git a/Interface/AddOns/SVUI_CraftOMatic/SVUI_CraftOMatic.lua b/Interface/AddOns/SVUI_CraftOMatic/SVUI_CraftOMatic.lua index fbe594d..8225d2c 100644 --- a/Interface/AddOns/SVUI_CraftOMatic/SVUI_CraftOMatic.lua +++ b/Interface/AddOns/SVUI_CraftOMatic/SVUI_CraftOMatic.lua @@ -187,6 +187,25 @@ CORE FUNCTIONS ########################################################## ]]-- function PLUGIN:CraftingReset() + if((not SV.db[Schema].farming) or (not SV.db[Schema].fishing) (not SV.db[Schema].cooking)) then + SV.db[Schema] = { + ["enable"] = true, + ["fontSize"] = 12, + ["farming"] = { + ["buttonsize"] = 35, + ["buttonspacing"] = 3, + ["onlyactive"] = false, + ["droptools"] = true, + ["toolbardirection"] = "HORIZONTAL", + }, + ["fishing"] = { + ["autoequip"] = true, + }, + ["cooking"] = { + ["autoequip"] = true, + }, + } + end self.TitleWindow:Clear(); self.LogWindow:Clear(); self.TitleWindow:AddMessage("Crafting Modes", 1, 1, 0); -- 1.7.9.5