Skip to content

Commit

Permalink
Add chat message to development versions
Browse files Browse the repository at this point in the history
  • Loading branch information
Snakybo committed Mar 23, 2024
1 parent 00e4d1e commit 1979f20
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 9 deletions.
5 changes: 5 additions & 0 deletions Clicked/Core/Clicked.lua
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,11 @@ function Clicked:OnInitialize()
end

function Clicked:OnEnable()
--- @debug@
local projectUrl = "https://www.curseforge.com/wow/addons/clicked"
print(Addon:AppendClickedMessagePrefix("You are using a development version, download the latest release from " .. projectUrl))
--- @end-debug@

self:RegisterEvent("PLAYER_REGEN_DISABLED", PLAYER_REGEN_DISABLED)
self:RegisterEvent("PLAYER_REGEN_ENABLED", PLAYER_REGEN_ENABLED)
self:RegisterEvent("PLAYER_ENTERING_WORLD", PLAYER_ENTERING_WORLD)
Expand Down
18 changes: 9 additions & 9 deletions Clicked/Core/Init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,17 @@ local Addon = select(2, ...)
---@diagnostic disable-next-line: lowercase-global
function dump(o)
if type(o) == 'table' then
local s = '{ '
for k,v in pairs(o) do
if type(k) ~= 'number' then k = '"'..k..'"' end
-- luacheck: ignore
s = s .. '['..k..'] = ' .. dump(v) .. ','
end
return s .. '} '
local s = '{ '
for k,v in pairs(o) do
if type(k) ~= 'number' then k = '"'..k..'"' end
-- luacheck: ignore
s = s .. '['..k..'] = ' .. dump(v) .. ','
end
return s .. '} '
else
return tostring(o)
return tostring(o)
end
end
end
---@end-debug@

--- @param err any
Expand Down

0 comments on commit 1979f20

Please sign in to comment.