elderscrolls-addon-achievem.../AchievementInfo.lua
Florian Brinker 603ee5f5f6 Init
In case that i stop maintaining this addon, feel free to contribute.
2016-08-03 13:20:28 +02:00

42 sor
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)