local _, addon = ... -- Prepare API object addon.API = {} -- Prepare Data objects addon.data = {}; addon.data.quest = {}; addon.data.item = {}; addon.data.speech = {} addon.data.tactic = {} -- Expose object as global for other addon integration CzechQuestsAddon = {} CzechQuestsAddon.data = addon.data local function InitStore() -- Init Store CzechQuestsAddon_Store = CzechQuestsAddon_Store or {} CzechQuestsAddon_Store.config = CzechQuestsAddon_Store.config or {} -- General Settings CzechQuestsAddon_Store.config.DEBUG_MODE = CzechQuestsAddon_Store.config.DEBUG_MODE or false -- Quest Settings CzechQuestsAddon_Store.config.QUEST_ENABLED = CzechQuestsAddon_Store.config.QUEST_ENABLED or true CzechQuestsAddon_Store.config.QUEST_DARK_MODE = CzechQuestsAddon_Store.config.QUEST_DARK_MODE or false CzechQuestsAddon_Store.config.QUEST_HEADER_FONT_SIZE = CzechQuestsAddon_Store.config.QUEST_HEADER_FONT_SIZE or 18 CzechQuestsAddon_Store.config.QUEST_TEXT_FONT_SIZE = CzechQuestsAddon_Store.config.QUEST_TEXT_FONT_SIZE or 14 CzechQuestsAddon_Store.config.QUEST_HEADER_FONT_NAME = CzechQuestsAddon_Store.config.QUEST_HEADER_FONT_NAME or 'morpheus_cz.ttf' CzechQuestsAddon_Store.config.QUEST_TEXT_FONT_NAME = CzechQuestsAddon_Store.config.QUEST_TEXT_FONT_NAME or 'frizquadratatt_cz.ttf' CzechQuestsAddon_Store.config.QUEST_TEXTURE_ALPHA = CzechQuestsAddon_Store.config.QUEST_TEXTURE_ALPHA or 80 CzechQuestsAddon_Store.config.QUEST_TEXTURE_ALPHA_ONLY_MOVING = CzechQuestsAddon_Store.config.QUEST_TEXTURE_ALPHA_ONLY_MOVING or true -- Speech Settings CzechQuestsAddon_Store.config.SPEECH_ENABLED = CzechQuestsAddon_Store.config.SPEECH_ENABLED or true CzechQuestsAddon_Store.config.SPEECH_TEXT_FONT_SIZE = CzechQuestsAddon_Store.config.SPEECH_TEXT_FONT_SIZE or 13 CzechQuestsAddon_Store.config.SPEECH_TEXT_FONT_NAME = CzechQuestsAddon_Store.config.SPEECH_TEXT_FONT_NAME or 'frizquadratatt_cz.ttf' CzechQuestsAddon_Store.config.SPEECH_FRAME_WIDTH = CzechQuestsAddon_Store.config.SPEECH_FRAME_WIDTH or 320 CzechQuestsAddon_Store.config.SPEECH_ORIGINAL_WHEN_MISSING = CzechQuestsAddon_Store.config.SPEECH_ORIGINAL_WHEN_MISSING or false CzechQuestsAddon_Store.config.SPEECH_MESSAGE_TEXTURE_ALPHA = CzechQuestsAddon_Store.config.SPEECH_MESSAGE_TEXTURE_ALPHA or 40 CzechQuestsAddon_Store.config.SPEECH_FRAME_POSITION_X = CzechQuestsAddon_Store.config.SPEECH_FRAME_POSITION_X or 0 CzechQuestsAddon_Store.config.SPEECH_FRAME_POSITION_Y = CzechQuestsAddon_Store.config.SPEECH_FRAME_POSITION_Y or 0 -- Tactic Settings CzechQuestsAddon_Store.config.TACTIC_ENABLED = CzechQuestsAddon_Store.config.TACTIC_ENABLED or true CzechQuestsAddon_Store.config.TACTIC_TEXT_FONT_SIZE = CzechQuestsAddon_Store.config.TACTIC_TEXT_FONT_SIZE or 12 CzechQuestsAddon_Store.config.TACTIC_TEXT_FONT_NAME = CzechQuestsAddon_Store.config.TACTIC_TEXT_FONT_NAME or 'frizquadratatt_cz.ttf' end -- Event handler frame local frame = CreateFrame("Frame") local function OnEvent(self, event, addonName, ...) if event == "ADDON_LOADED" and addonName == 'CzechQuests' then InitStore() addon.API.InitOptions() addon.API.InitQuests() addon.API.InitSpeeches() addon.API.InitTactics() self:UnregisterEvent("ADDON_LOADED") end end -- Register the event frame:RegisterEvent("ADDON_LOADED") frame:SetScript("OnEvent", OnEvent)