Skip to content

Commit

Permalink
*ns.db* to *ns.profile* (forgotten)
Browse files Browse the repository at this point in the history
  • Loading branch information
bkader committed Jan 26, 2023
1 parent a9dadd3 commit dbbe73b
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
26 changes: 13 additions & 13 deletions Skada/Core/Init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ function Private.RegisterClasses()
-- alias to enemy for now...
classcolors.PLAYER = classcolors.ENEMY

local P = ns.db
local P = ns.profile

-- some useful functions
classcolors.unpack = function(class)
Expand Down Expand Up @@ -946,7 +946,7 @@ do
end

-- install default options
local P = ns.db
local P = ns.profile
P.toast = P.toast or ns.defaults.toast

LibToast:Register(format("%sToastFrame", folder), function(toast, text, title, icon, urgency)
Expand Down Expand Up @@ -983,10 +983,10 @@ do
type = "group",
name = L["Notifications"],
get = function(i)
return ns.db.toast[i[#i]] or LibToast.config[i[#i]]
return ns.profile.toast[i[#i]] or LibToast.config[i[#i]]
end,
set = function(i, val)
ns.db.toast[i[#i]] = val
ns.profile.toast[i[#i]] = val
LibToast.config[i[#i]] = val
end,
order = 990,
Expand Down Expand Up @@ -1051,7 +1051,7 @@ do
type = "execute",
name = L["Test Notifications"],
func = function() ns:Notify() end,
disabled = function() return ns.db.toast.hide_toasts end,
disabled = function() return ns.profile.toast.hide_toasts end,
width = "double",
order = 60
}
Expand All @@ -1077,7 +1077,7 @@ do

local values = {al = 0x10, rb = 0x01, rt = 0x02, db = 0x04, dt = 0x08}
local disabled = function()
return (band(ns.db.totalflag or 0, values.al) ~= 0)
return (band(ns.profile.totalflag or 0, values.al) ~= 0)
end

total_opt = {
Expand All @@ -1092,14 +1092,14 @@ do
inline = true,
order = 10,
get = function(i)
return (band(ns.db.totalflag or 0, values[i[#i]]) ~= 0)
return (band(ns.profile.totalflag or 0, values[i[#i]]) ~= 0)
end,
set = function(i, val)
local v = values[i[#i]]
if val and band(ns.db.totalflag or 0, v) == 0 then
ns.db.totalflag = (ns.db.totalflag or 0) + v
elseif not val and band(ns.db.totalflag or 0, v) ~= 0 then
ns.db.totalflag = max(0, (ns.db.totalflag or 0) - v)
if val and band(ns.profile.totalflag or 0, v) == 0 then
ns.profile.totalflag = (ns.profile.totalflag or 0) + v
elseif not val and band(ns.profile.totalflag or 0, v) ~= 0 then
ns.profile.totalflag = max(0, (ns.profile.totalflag or 0) - v)
end
end,
args = {
Expand Down Expand Up @@ -1153,11 +1153,11 @@ do
end

function Private.total_noclick(set, mode)
return (not ns.db.totalidc and set == "total" and type(mode) == "table" and mode.nototal == true)
return (not ns.profile.totalidc and set == "total" and type(mode) == "table" and mode.nototal == true)
end

local function total_record(set)
local totalflag = ns.total and set and ns.db.totalflag
local totalflag = ns.total and set and ns.profile.totalflag

-- something missing
if not totalflag then
Expand Down
2 changes: 1 addition & 1 deletion Skada/Skada.toc
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
## DefaultState: enabled
## Author: Kader (|cff808080bkader#5341|r)
## Version: 1.8.84
## X-Date: 2023-01-24 @ 01:12 |cff808080UTC|r
## X-Date: 2023-01-26 @ 09:17 |cff808080UTC|r
## X-Credits: Zarnivoop
## X-Curse-Project-ID: 623633
## X-Category: Combat
Expand Down

0 comments on commit dbbe73b

Please sign in to comment.