Skip to content

Commit

Permalink
Update libs, interface version
Browse files Browse the repository at this point in the history
  • Loading branch information
solocommand committed Jul 27, 2024
1 parent 51a783a commit 93209d5
Show file tree
Hide file tree
Showing 33 changed files with 939 additions and 455 deletions.
2 changes: 1 addition & 1 deletion Scoreboard.toc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Interface: 100000
## Interface: 110000, 110002
## Title: Scoreboard
## Notes: A customizable data broker for displaying player currencies
## Author: solocommand
Expand Down
4 changes: 2 additions & 2 deletions vendor/AceConfig-3.0/AceConfig-3.0.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
-- as well as associate it with a slash command.
-- @class file
-- @name AceConfig-3.0
-- @release $Id: AceConfig-3.0.lua 1202 2019-05-15 23:11:22Z nevcairiel $
-- @release $Id: AceConfig-3.0.lua 1335 2024-05-05 19:35:16Z nevcairiel $

--[[
AceConfig-3.0
Expand All @@ -27,7 +27,7 @@ if not AceConfig then return end
local pcall, error, type, pairs = pcall, error, type, pairs

-- -------------------------------------------------------------------
-- :RegisterOptionsTable(appName, options, slashcmd, persist)
-- :RegisterOptionsTable(appName, options, slashcmd)
--
-- - appName - (string) application name
-- - options - table or function ref, see AceConfigRegistry
Expand Down
35 changes: 14 additions & 21 deletions vendor/AceConfig-3.0/AceConfigCmd-3.0/AceConfigCmd-3.0.lua
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
--- AceConfigCmd-3.0 handles access to an options table through the "command line" interface via the ChatFrames.
-- @class file
-- @name AceConfigCmd-3.0
-- @release $Id: AceConfigCmd-3.0.lua 1202 2019-05-15 23:11:22Z nevcairiel $
-- @release $Id: AceConfigCmd-3.0.lua 1284 2022-09-25 09:15:30Z nevcairiel $

--[[
AceConfigCmd-3.0
Expand Down Expand Up @@ -37,17 +37,10 @@ local error, assert = error, assert
-- WoW APIs
local _G = _G

-- Global vars/functions that we don't upvalue since they might get hooked, or upgraded
-- List them here for Mikk's FindGlobals script
-- GLOBALS: LibStub, SELECTED_CHAT_FRAME, DEFAULT_CHAT_FRAME


local L = setmetatable({}, { -- TODO: replace with proper locale
__index = function(self,k) return k end
})



local function print(msg)
(SELECTED_CHAT_FRAME or DEFAULT_CHAT_FRAME):AddMessage(msg)
end
Expand Down Expand Up @@ -401,7 +394,7 @@ local function handle(info, inputpos, tab, depth, retfalse)
return
end

local str = strsub(info.input,inputpos);
local strInput = strsub(info.input,inputpos);

if tab.type=="execute" then
------------ execute --------------------------------------------
Expand All @@ -414,21 +407,21 @@ local function handle(info, inputpos, tab, depth, retfalse)

local res = true
if tab.pattern then
if not(type(tab.pattern)=="string") then err(info, inputpos, "'pattern' - expected a string") end
if not strmatch(str, tab.pattern) then
usererr(info, inputpos, "'"..str.."' - " .. L["invalid input"])
if type(tab.pattern)~="string" then err(info, inputpos, "'pattern' - expected a string") end
if not strmatch(strInput, tab.pattern) then
usererr(info, inputpos, "'"..strInput.."' - " .. L["invalid input"])
return
end
end

do_final(info, inputpos, tab, "set", str)
do_final(info, inputpos, tab, "set", strInput)



elseif tab.type=="toggle" then
------------ toggle --------------------------------------------
local b
local str = strtrim(strlower(str))
local str = strtrim(strlower(strInput))
if str=="" then
b = callmethod(info, inputpos, tab, "get")

Expand Down Expand Up @@ -465,9 +458,9 @@ local function handle(info, inputpos, tab, depth, retfalse)

elseif tab.type=="range" then
------------ range --------------------------------------------
local val = tonumber(str)
local val = tonumber(strInput)
if not val then
usererr(info, inputpos, "'"..str.."' - "..L["expected number"])
usererr(info, inputpos, "'"..strInput.."' - "..L["expected number"])
return
end
if type(info.step)=="number" then
Expand All @@ -487,7 +480,7 @@ local function handle(info, inputpos, tab, depth, retfalse)

elseif tab.type=="select" then
------------ select ------------------------------------
local str = strtrim(strlower(str))
local str = strtrim(strlower(strInput))

local values = tab.values
if type(values) == "function" or type(values) == "string" then
Expand Down Expand Up @@ -528,7 +521,7 @@ local function handle(info, inputpos, tab, depth, retfalse)

elseif tab.type=="multiselect" then
------------ multiselect -------------------------------------------
local str = strtrim(strlower(str))
local str = strtrim(strlower(strInput))

local values = tab.values
if type(values) == "function" or type(values) == "string" then
Expand Down Expand Up @@ -565,7 +558,7 @@ local function handle(info, inputpos, tab, depth, retfalse)

--check that the opt is valid
local ok
for k,v in pairs(values) do
for k in pairs(values) do
if strlower(k)==opt then
opt = k -- overwrite with key (in case of case mismatches)
ok = true
Expand Down Expand Up @@ -634,7 +627,7 @@ local function handle(info, inputpos, tab, depth, retfalse)

elseif tab.type=="color" then
------------ color --------------------------------------------
local str = strtrim(strlower(str))
local str = strtrim(strlower(strInput))
if str == "" then
--TODO: Show current value
return
Expand Down Expand Up @@ -706,7 +699,7 @@ local function handle(info, inputpos, tab, depth, retfalse)

elseif tab.type=="keybinding" then
------------ keybinding --------------------------------------------
local str = strtrim(strlower(str))
local str = strtrim(strlower(strInput))
if str == "" then
--TODO: Show current value
return
Expand Down
Loading

0 comments on commit 93209d5

Please sign in to comment.