remove namespace

This commit is contained in:
Imbus 2024-03-10 16:37:24 +01:00
parent 662814e302
commit a1a80c4035

View file

@ -26,7 +26,7 @@ local function bprint(msg)
end
-- Prints some separators
function u.guards()
function guards()
local accum = ""
for _ = 1, 30 do
accum = accum .. "="
@ -34,19 +34,19 @@ function u.guards()
print(colorWrap(accum, COLOR.legendary))
end
function u.info(msg)
function info(msg)
bprint(colorWrap(msg, COLOR.heirloom))
end
function u.warn(msg)
function warn(msg)
bprint(colorWrap(msg, COLOR.warning))
end
function u.error(msg)
function error(msg)
bprint(colorWrap(msg, COLOR.red))
end
function u.success(msg)
function success(msg)
bprint(colorWrap(msg, COLOR.green))
end
@ -155,9 +155,9 @@ end
local function setBindingRM(key, action)
unsetBinding(action);
if SetBinding(key, action) then
u.success(key .. " -> " .. action);
success(key .. " -> " .. action);
else
u.error("Failed to set binding " .. key .. " to " .. action);
error("Failed to set binding " .. key .. " to " .. action);
end
end
@ -165,8 +165,8 @@ local function applyBindingSet(set)
for key, action in pairs(set) do
setBindingRM(key, action)
end
u.info("Bindings set!")
u.warn("Dont forget to reload your UI.")
info("Bindings set!")
warn("Dont forget to reload your UI.")
end
local function enableBars()
@ -188,7 +188,7 @@ local function enableBars()
end
local function BindsHandler(msg, editbox)
u.guards()
guards()
if msg == "" then
applyBindingSet(myBinds)
enableBars()
@ -197,7 +197,7 @@ local function BindsHandler(msg, editbox)
applyBindingSet(cameraBinds)
end
SaveBindings(1)
u.guards()
guards()
end
-- Register the /hello command