603ee5f5f6
In case that i stop maintaining this addon, feel free to contribute.
42 строки
1.1 KiB
Lua
42 строки
1.1 KiB
Lua
--[[
|
|
AchievementInfo
|
|
@author Asto, @Astarax
|
|
]]
|
|
|
|
|
|
|
|
-- Init
|
|
AchievementInfo.hijackedFirstLoad = false
|
|
function AchievementInfo.initialize(eventCode, addOnName)
|
|
if (addOnName ~= AchievementInfo.name) then return end
|
|
|
|
--
|
|
if AchievementInfo.hijackedFirstLoad == false then
|
|
AchievementInfo.hijackedFirstLoad = true
|
|
|
|
-- Load Saved Variables
|
|
AchievementInfo.savedVars = AchievementInfo.loadSavedVars()
|
|
|
|
-- Load Language Data
|
|
LANG = AchievementInfo.loadLanguage()
|
|
|
|
-- Settings Panel
|
|
AchievementInfo.createSettingsPanel()
|
|
|
|
-- Register Events
|
|
AchievementInfo.registerEvent(EVENT_ACHIEVEMENT_UPDATED, AchievementInfo.onAchievementUpdated)
|
|
end
|
|
|
|
-- Status Output (debug mode only)
|
|
if AchievementInfo.settingGet("devDebug") then
|
|
zo_callLater(function()
|
|
AchievementInfo.echo(AchievementInfo.name .. " initialized in DEBUG MODE :)")
|
|
end, 500)
|
|
end
|
|
end
|
|
|
|
|
|
|
|
-- Register the Init Event
|
|
AchievementInfo.registerEvent(EVENT_ADD_ON_LOADED, AchievementInfo.initialize)
|