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 62b462f..24009a2 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
@@ -393,7 +393,6 @@ local meta_database = {
local dv = rawget(t, "defaults")
local src = dv and dv[k]
- --print(k .. " - " .. tostring(src))
if(src ~= nil) then
if(type(src) == "table") then
if(sv[k] == nil or (sv[k] ~= nil and type(sv[k]) ~= "table")) then sv[k] = {} end
@@ -730,12 +729,9 @@ local function SetExternalModule(obj, schema, addonName, header, lod)
obj.NameID = addonName
obj.Schema = schema
obj.TitleID = header
+ obj.LoD = lod
- if(CoreObject.configs[schema]) then
- obj.db = CoreObject.configs[schema]
- else
- obj.db = {}
- end
+ if not obj.db then obj.db = {} end
obj.initialized = false
obj.CombatLocked = false
@@ -908,6 +904,7 @@ function lib:LoadQueuedModules()
if obj and not obj.initialized then
obj.initialized = true;
local halt = false
+ --print(schema .. " LoadQueuedModules")
self:NewDatabase(obj)
if(obj.db.incompatible) then
for addon,_ in pairs(obj.db.incompatible) do
@@ -929,6 +926,7 @@ end
local function NewLoadOnDemand(addonName, schema, header)
LoadOnDemand[schema] = addonName;
+ PROFILE_SV.SAFEDATA[schema] = PROFILE_SV.SAFEDATA[schema] or {["enable"] = false}
CoreObject.configs[schema] = {["enable"] = false}
CoreObject.Options.args.plugins.args.pluginOptions.args[schema] = {
type = "group",
@@ -949,10 +947,10 @@ local function NewLoadOnDemand(addonName, schema, header)
func = function()
if(not IsAddOnLoaded(addonName)) then
local loaded, reason = LoadAddOn(addonName)
- PROFILE_SV.STORED[SOURCE_KEY][schema].enable = true
+ PROFILE_SV.SAFEDATA[schema].enable = true
lib:LoadQueuedModules()
else
- PROFILE_SV.STORED[SOURCE_KEY][schema].enable = false
+ PROFILE_SV.SAFEDATA[schema].enable = false
CoreObject:StaticPopup_Show("RL_CLIENT")
end
end,
@@ -1131,8 +1129,9 @@ end
function lib:Launch()
if LoadOnDemand then
for schema,name in pairs(LoadOnDemand) do
- local db = CoreObject.db[schema]
+ local db = PROFILE_SV.SAFEDATA[schema]
if(db and (db.enable or db.enable ~= false)) then
+ CoreObject.db[schema].enable = PROFILE_SV.SAFEDATA[schema].enable
if(not IsAddOnLoaded(name)) then
local loaded, reason = LoadAddOn(name)
end
diff --git a/Interface/AddOns/SVUI_Laborer/SVUI_Laborer.lua b/Interface/AddOns/SVUI_Laborer/SVUI_Laborer.lua
index 97b3e02..1191fce 100644
--- a/Interface/AddOns/SVUI_Laborer/SVUI_Laborer.lua
+++ b/Interface/AddOns/SVUI_Laborer/SVUI_Laborer.lua
@@ -140,24 +140,6 @@ end
CORE FUNCTIONS
##########################################################
]]--
-SV.configs[Schema] = {
- ["enable"] = true,
- ["fontSize"] = 12,
- ["farming"] = {
- ["buttonsize"] = 35,
- ["buttonspacing"] = 3,
- ["onlyactive"] = false,
- ["droptools"] = true,
- ["toolbardirection"] = "HORIZONTAL",
- },
- ["fishing"] = {
- ["autoequip"] = true,
- },
- ["cooking"] = {
- ["autoequip"] = true,
- },
-}
-
function PLUGIN:WorldFrameHook(button)
if InCombatLockdown() then return end
if(currentModeKey and button == "RightButton" and CheckForDoubleClick()) then
@@ -563,7 +545,8 @@ function PLUGIN:Load()
min = 6,
max = 22,
step = 1,
- set = function(j,value)PLUGIN:ChangeDBVar(value,j[#j]);PLUGIN:UpdateLogWindow()end
+ get = function(key)return self.db[key[#key]] end,
+ set = function(j,value) PLUGIN:ChangeDBVar(value,j[#j]);PLUGIN:UpdateLogWindow()end
}
self:AddOption("fontSize", option)
option = {
@@ -665,4 +648,22 @@ function PLUGIN:Load()
self:AddOption("farming", option)
end
+SV.configs[Schema] = {
+ ["enable"] = true,
+ ["fontSize"] = 12,
+ ["farming"] = {
+ ["buttonsize"] = 35,
+ ["buttonspacing"] = 3,
+ ["onlyactive"] = false,
+ ["droptools"] = true,
+ ["toolbardirection"] = "HORIZONTAL",
+ },
+ ["fishing"] = {
+ ["autoequip"] = true,
+ },
+ ["cooking"] = {
+ ["autoequip"] = true,
+ },
+}
+
SVLib:NewPlugin(PLUGIN)
\ No newline at end of file