From 49539b8bc690465b0c53b67da1fcab598d8f7698 Mon Sep 17 00:00:00 2001 From: Steven Jackson Date: Mon, 8 Sep 2014 18:54:47 -0500 Subject: [PATCH] full rewrite of variable names --- Interface/AddOns/SVUI/SVUI.lua | 991 -------------------- Interface/AddOns/SVUI/SVUI.toc | 4 +- Interface/AddOns/SVUI/SVUI.xml | 13 +- .../SVUI/assets/artwork/Doodads/GPS-ANIMATION.blp | Bin 6676 -> 0 bytes .../SVUI/assets/artwork/Doodads/GPS-ARROW.blp | Bin 2580 -> 0 bytes .../SVUI/assets/artwork/Doodads/GPS-BORDER.blp | Bin 6676 -> 0 bytes .../SVUI/assets/artwork/Doodads/GPS-CLOSE.blp | Bin 2580 -> 0 bytes .../SVUI/assets/artwork/Doodads/GPS-OPEN.blp | Bin 2580 -> 0 bytes Interface/AddOns/SVUI/language/chinese_ui.lua | 4 +- Interface/AddOns/SVUI/language/english_ui.lua | 4 +- Interface/AddOns/SVUI/language/french_ui.lua | 4 +- Interface/AddOns/SVUI/language/german_ui.lua | 4 +- Interface/AddOns/SVUI/language/italian_ui.lua | 4 +- Interface/AddOns/SVUI/language/korean_ui.lua | 4 +- Interface/AddOns/SVUI/language/portuguese_ui.lua | 4 +- Interface/AddOns/SVUI/language/russian_ui.lua | 4 +- Interface/AddOns/SVUI/language/spanish_ui.lua | 8 +- Interface/AddOns/SVUI/language/taiwanese_ui.lua | 4 +- .../LibActionButton-1.0/LibActionButton-1.0.lua | 2 +- .../LibBalancePowerTracker-1.1.lua | 6 +- Interface/AddOns/SVUI/libs/oUF/LICENSE | 2 +- .../AddOns/SVUI/libs/oUF/elements/castbar.lua | 5 +- Interface/AddOns/SVUI/libs/oUF/elements/health.lua | 32 +- .../oUF_ActionPanel/oUF_ActionPanel.lua | 2 +- .../oUF_CombatFader/oUF_CombatFader.lua | 22 +- .../AddOns/SVUI/packages/actionbar/KeyBind.lua | 24 +- Interface/AddOns/SVUI/packages/actionbar/SVBar.lua | 86 +- Interface/AddOns/SVUI/packages/aura/SVAura.lua | 38 +- Interface/AddOns/SVUI/packages/bag/SVBag.lua | 84 +- .../AddOns/SVUI/packages/bag/tools/breakstuff.lua | 10 +- .../AddOns/SVUI/packages/bag/tools/sorting.lua | 4 +- Interface/AddOns/SVUI/packages/chat/SVChat.lua | 98 +- Interface/AddOns/SVUI/packages/dock/SVDock.lua | 136 +-- Interface/AddOns/SVUI/packages/gear/SVGear.lua | 26 +- .../AddOns/SVUI/packages/henchmen/SVHenchmen.lua | 86 +- Interface/AddOns/SVUI/packages/map/SVMap.lua | 74 +- .../AddOns/SVUI/packages/override/SVOverride.lua | 90 +- Interface/AddOns/SVUI/packages/plates/SVPlate.lua | 54 +- Interface/AddOns/SVUI/packages/stats/SVStats.lua | 30 +- .../AddOns/SVUI/packages/stats/stats/bags.lua | 8 +- Interface/AddOns/SVUI/packages/stats/stats/cta.lua | 8 +- Interface/AddOns/SVUI/packages/stats/stats/dps.lua | 8 +- .../SVUI/packages/stats/stats/durability.lua | 14 +- .../SVUI/packages/stats/stats/experience.lua | 8 +- .../AddOns/SVUI/packages/stats/stats/friends.lua | 14 +- .../AddOns/SVUI/packages/stats/stats/gold.lua | 4 +- .../AddOns/SVUI/packages/stats/stats/guild.lua | 18 +- Interface/AddOns/SVUI/packages/stats/stats/hps.lua | 8 +- .../SVUI/packages/stats/stats/reputation.lua | 4 +- .../AddOns/SVUI/packages/stats/stats/system.lua | 4 +- .../AddOns/SVUI/packages/stats/stats/time.lua | 12 +- .../AddOns/SVUI/packages/stats/stats/tokens.lua | 4 +- Interface/AddOns/SVUI/packages/tip/SVTip.lua | 54 +- Interface/AddOns/SVUI/packages/unit/SVUnit.lua | 166 ++-- Interface/AddOns/SVUI/packages/unit/config.lua | 9 +- .../AddOns/SVUI/packages/unit/elements/auras.lua | 72 +- .../AddOns/SVUI/packages/unit/elements/castbar.lua | 52 +- .../SVUI/packages/unit/elements/essentials.lua | 32 +- .../AddOns/SVUI/packages/unit/elements/misc.lua | 20 +- .../AddOns/SVUI/packages/unit/elements/tags.lua | 208 ++-- Interface/AddOns/SVUI/packages/unit/frames.lua | 160 ++-- .../SVUI/packages/unit/resources/deathknight.lua | 14 +- .../AddOns/SVUI/packages/unit/resources/druid.lua | 34 +- .../AddOns/SVUI/packages/unit/resources/hunter.lua | 10 +- .../AddOns/SVUI/packages/unit/resources/mage.lua | 20 +- .../AddOns/SVUI/packages/unit/resources/monk.lua | 18 +- .../SVUI/packages/unit/resources/paladin.lua | 20 +- .../AddOns/SVUI/packages/unit/resources/priest.lua | 18 +- .../AddOns/SVUI/packages/unit/resources/rogue.lua | 16 +- .../AddOns/SVUI/packages/unit/resources/shaman.lua | 14 +- .../SVUI/packages/unit/resources/warlock.lua | 50 +- .../SVUI/packages/unit/resources/warrior.lua | 10 +- Interface/AddOns/SVUI/scripts/comix.lua | 42 +- Interface/AddOns/SVUI/scripts/misc.lua | 60 +- Interface/AddOns/SVUI/scripts/mounts.lua | 16 +- Interface/AddOns/SVUI/scripts/questwatch.lua | 50 +- Interface/AddOns/SVUI/scripts/raid.lua | 26 +- Interface/AddOns/SVUI/scripts/reactions.lua | 18 +- Interface/AddOns/SVUI/scripts/spellbind.lua | 32 +- Interface/AddOns/SVUI/system/alerts.lua | 160 ++-- Interface/AddOns/SVUI/system/animate.lua | 447 +++++++++ Interface/AddOns/SVUI/system/cartography.lua | 491 ---------- Interface/AddOns/SVUI/system/common.lua | 138 +-- Interface/AddOns/SVUI/system/database.lua | 201 +--- Interface/AddOns/SVUI/system/global.lua | 481 ++++++++++ Interface/AddOns/SVUI/system/installer.lua | 382 ++++---- Interface/AddOns/SVUI/system/load.lua | 317 +++++++ Interface/AddOns/SVUI/system/media.lua | 433 +++++++++ Interface/AddOns/SVUI/system/mentalo.lua | 190 ++-- Interface/AddOns/SVUI/system/mentalo.xml | 2 + Interface/AddOns/SVUI/system/presets.lua | 10 +- Interface/AddOns/SVUI/system/registry.lua | 571 +++++++++++ Interface/AddOns/SVUI/system/slash.lua | 22 +- Interface/AddOns/SVUI/system/system.lua | 929 ------------------ Interface/AddOns/SVUI/system/timers.lua | 20 +- Interface/AddOns/SVUI/system/updates.lua | 269 ------ Interface/AddOns/SVUI/system/utilities.lua | 129 ++- Interface/AddOns/SVUI/system/visibility.lua | 18 +- .../SVUI_AnsweringService.lua | 46 +- Interface/AddOns/SVUI_ArtOfWar/SVUI_ArtOfWar.lua | 107 ++- .../AddOns/SVUI_ConfigOMatic/SVUI_ConfigOMatic.lua | 318 +++---- .../AddOns/SVUI_ConfigOMatic/language/generic.lua | 2 +- .../widgets/AceGUIContainer-TreeGroup.lua | 2 +- .../widgets/AceGUIWidget-InteractiveLabel.lua | 2 +- .../AceGUI-3.0-SharedMediaWidgets/prototypes.lua | 2 +- .../widgets/AceGUIContainer-TreeGroup.lua | 2 +- .../widgets/AceGUIWidget-InteractiveLabel.lua | 2 +- Interface/AddOns/SVUI_ConfigOMatic/modules/art.lua | 18 +- .../AddOns/SVUI_ConfigOMatic/modules/aura.lua | 28 +- Interface/AddOns/SVUI_ConfigOMatic/modules/bag.lua | 40 +- Interface/AddOns/SVUI_ConfigOMatic/modules/bar.lua | 142 +-- .../AddOns/SVUI_ConfigOMatic/modules/chat.lua | 16 +- .../AddOns/SVUI_ConfigOMatic/modules/dock.lua | 62 +- .../AddOns/SVUI_ConfigOMatic/modules/dynamic.lua | 6 +- .../AddOns/SVUI_ConfigOMatic/modules/filter.lua | 192 ++-- .../AddOns/SVUI_ConfigOMatic/modules/henchmen.lua | 62 +- Interface/AddOns/SVUI_ConfigOMatic/modules/map.lua | 26 +- .../AddOns/SVUI_ConfigOMatic/modules/mode.lua | 20 +- .../AddOns/SVUI_ConfigOMatic/modules/plate.lua | 82 +- .../AddOns/SVUI_ConfigOMatic/modules/profiles.lua | 30 +- .../AddOns/SVUI_ConfigOMatic/modules/stat.lua | 16 +- Interface/AddOns/SVUI_ConfigOMatic/modules/tip.lua | 36 +- .../SVUI_ConfigOMatic/modules/units/core.lua | 348 +++---- .../SVUI_ConfigOMatic/modules/units/focus.lua | 22 +- .../SVUI_ConfigOMatic/modules/units/grid.lua | 40 +- .../SVUI_ConfigOMatic/modules/units/other.lua | 42 +- .../SVUI_ConfigOMatic/modules/units/party.lua | 24 +- .../AddOns/SVUI_ConfigOMatic/modules/units/pet.lua | 30 +- .../SVUI_ConfigOMatic/modules/units/player.lua | 34 +- .../SVUI_ConfigOMatic/modules/units/raid.lua | 40 +- .../SVUI_ConfigOMatic/modules/units/target.lua | 30 +- Interface/AddOns/SVUI_DebugOMatic/Bindings.xml | 5 + .../AddOns/SVUI_DebugOMatic/SVUI_DebugOMatic.toc | 9 + .../AddOns/SVUI_DebugOMatic/SVUI_DebugOMatic.xml | 116 +++ Interface/AddOns/SVUI_DebugOMatic/debug.lua | 296 ++++++ Interface/AddOns/SVUI_Laborer/SVUI_Laborer.lua | 58 +- .../AddOns/SVUI_Laborer/modes/archaeology.lua | 18 +- Interface/AddOns/SVUI_Laborer/modes/cooking.lua | 2 +- Interface/AddOns/SVUI_Laborer/modes/farming.lua | 24 +- Interface/AddOns/SVUI_Laborer/modes/fishing.lua | 2 +- Interface/AddOns/SVUI_LogOMatic/SVUI_LogOMatic.lua | 34 +- .../AddOns/SVUI_StyleOMatic/SVUI_StyleOMatic.lua | 96 +- .../AddOns/SVUI_StyleOMatic/addons/achievement.lua | 70 +- Interface/AddOns/SVUI_StyleOMatic/addons/alert.lua | 98 +- .../AddOns/SVUI_StyleOMatic/addons/archeology.lua | 18 +- .../SVUI_StyleOMatic/addons/auctionhouse.lua | 46 +- .../AddOns/SVUI_StyleOMatic/addons/barbershop.lua | 22 +- .../AddOns/SVUI_StyleOMatic/addons/battlefield.lua | 16 +- .../AddOns/SVUI_StyleOMatic/addons/blackmarket.lua | 14 +- .../AddOns/SVUI_StyleOMatic/addons/calendar.lua | 50 +- .../AddOns/SVUI_StyleOMatic/addons/challenges.lua | 8 +- .../AddOns/SVUI_StyleOMatic/addons/character.lua | 94 +- Interface/AddOns/SVUI_StyleOMatic/addons/chat.lua | 74 +- .../AddOns/SVUI_StyleOMatic/addons/dressup.lua | 6 +- .../SVUI_StyleOMatic/addons/encounterjournal.lua | 40 +- .../AddOns/SVUI_StyleOMatic/addons/friends.lua | 72 +- .../AddOns/SVUI_StyleOMatic/addons/gossip.lua | 18 +- Interface/AddOns/SVUI_StyleOMatic/addons/guild.lua | 114 +-- Interface/AddOns/SVUI_StyleOMatic/addons/help.lua | 28 +- .../AddOns/SVUI_StyleOMatic/addons/inspect.lua | 34 +- .../SVUI_StyleOMatic/addons/itemsocketing.lua | 18 +- .../AddOns/SVUI_StyleOMatic/addons/itemupgrade.lua | 12 +- .../AddOns/SVUI_StyleOMatic/addons/keybinding.lua | 12 +- Interface/AddOns/SVUI_StyleOMatic/addons/lfd.lua | 68 +- .../AddOns/SVUI_StyleOMatic/addons/loothistory.lua | 24 +- .../SVUI_StyleOMatic/addons/lossofcontrol.lua | 12 +- Interface/AddOns/SVUI_StyleOMatic/addons/macro.lua | 30 +- .../AddOns/SVUI_StyleOMatic/addons/mailbox.lua | 40 +- .../AddOns/SVUI_StyleOMatic/addons/merchant.lua | 26 +- .../AddOns/SVUI_StyleOMatic/addons/petbattle.lua | 38 +- .../AddOns/SVUI_StyleOMatic/addons/petition.lua | 8 +- .../AddOns/SVUI_StyleOMatic/addons/petjournal.lua | 80 +- .../AddOns/SVUI_StyleOMatic/addons/petstable.lua | 12 +- Interface/AddOns/SVUI_StyleOMatic/addons/pvp.lua | 64 +- Interface/AddOns/SVUI_StyleOMatic/addons/quest.lua | 60 +- Interface/AddOns/SVUI_StyleOMatic/addons/raid.lua | 26 +- .../AddOns/SVUI_StyleOMatic/addons/reforging.lua | 14 +- .../AddOns/SVUI_StyleOMatic/addons/spellbook.lua | 24 +- Interface/AddOns/SVUI_StyleOMatic/addons/store.lua | 4 +- .../SVUI_StyleOMatic/addons/supervillain.lua | 34 +- .../AddOns/SVUI_StyleOMatic/addons/system.lua | 58 +- .../AddOns/SVUI_StyleOMatic/addons/tabard.lua | 24 +- .../AddOns/SVUI_StyleOMatic/addons/talents.lua | 50 +- Interface/AddOns/SVUI_StyleOMatic/addons/taxi.lua | 4 +- .../SVUI_StyleOMatic/addons/thirdparty/ACP.lua | 2 +- .../SVUI_StyleOMatic/addons/thirdparty/AdiBags.lua | 6 +- .../addons/thirdparty/Altoholic.lua | 30 +- .../addons/thirdparty/AtlasLoot.lua | 6 +- .../addons/thirdparty/AuctionLite.lua | 2 +- .../SVUI_StyleOMatic/addons/thirdparty/BigWigs.lua | 6 +- .../SVUI_StyleOMatic/addons/thirdparty/Bugsack.lua | 4 +- .../SVUI_StyleOMatic/addons/thirdparty/Clique.lua | 6 +- .../SVUI_StyleOMatic/addons/thirdparty/Cooline.lua | 4 +- .../SVUI_StyleOMatic/addons/thirdparty/DBM.lua | 14 +- .../SVUI_StyleOMatic/addons/thirdparty/DXE.lua | 18 +- .../addons/thirdparty/LightHeaded.lua | 4 +- .../SVUI_StyleOMatic/addons/thirdparty/Mogit.lua | 10 +- .../SVUI_StyleOMatic/addons/thirdparty/Omen.lua | 12 +- .../addons/thirdparty/Outfitter.lua | 6 +- .../SVUI_StyleOMatic/addons/thirdparty/Postal.lua | 2 +- .../SVUI_StyleOMatic/addons/thirdparty/Quartz.lua | 2 +- .../SVUI_StyleOMatic/addons/thirdparty/Recount.lua | 8 +- .../addons/thirdparty/SexyCooldown.lua | 4 +- .../SVUI_StyleOMatic/addons/thirdparty/Skada.lua | 14 +- .../SVUI_StyleOMatic/addons/thirdparty/TinyDPS.lua | 4 +- .../SVUI_StyleOMatic/addons/thirdparty/TomTom.lua | 2 +- .../addons/thirdparty/TradeSkillDW.lua | 46 +- .../SVUI_StyleOMatic/addons/thirdparty/VEM.lua | 14 +- .../addons/thirdparty/WeakAuras.lua | 6 +- .../addons/thirdparty/alDamageMeter.lua | 8 +- .../AddOns/SVUI_StyleOMatic/addons/timemanager.lua | 12 +- Interface/AddOns/SVUI_StyleOMatic/addons/trade.lua | 28 +- .../AddOns/SVUI_StyleOMatic/addons/tradeskill.lua | 30 +- .../AddOns/SVUI_StyleOMatic/addons/trainer.lua | 16 +- .../AddOns/SVUI_StyleOMatic/addons/transmog.lua | 18 +- .../AddOns/SVUI_StyleOMatic/addons/voidstorage.lua | 12 +- .../AddOns/SVUI_StyleOMatic/addons/worldmap.lua | 10 +- .../AddOns/SVUI_StyleOMatic/addons/worldstate.lua | 8 +- .../AddOns/SVUI_StyleOMatic/common/methods.lua | 60 +- .../SVUI_TrackingDevice/SVUI_TrackingDevice.lua | 156 ++- .../SVUI_TrackingDevice/SVUI_TrackingDevice.toc | 2 +- .../SVUI_TrackingDevice/SVUI_TrackingDevice.xml | 11 +- .../SVUI_TrackingDevice/artwork/GPS-ARROW.blp | Bin 0 -> 2580 bytes .../SVUI_TrackingDevice/libs/oUF_GPS/oUF_GPS.lua | 133 ++- 224 files changed, 6689 insertions(+), 6668 deletions(-) delete mode 100644 Interface/AddOns/SVUI/SVUI.lua delete mode 100644 Interface/AddOns/SVUI/assets/artwork/Doodads/GPS-ANIMATION.blp delete mode 100644 Interface/AddOns/SVUI/assets/artwork/Doodads/GPS-ARROW.blp delete mode 100644 Interface/AddOns/SVUI/assets/artwork/Doodads/GPS-BORDER.blp delete mode 100644 Interface/AddOns/SVUI/assets/artwork/Doodads/GPS-CLOSE.blp delete mode 100644 Interface/AddOns/SVUI/assets/artwork/Doodads/GPS-OPEN.blp create mode 100644 Interface/AddOns/SVUI/system/animate.lua delete mode 100644 Interface/AddOns/SVUI/system/cartography.lua create mode 100644 Interface/AddOns/SVUI/system/global.lua create mode 100644 Interface/AddOns/SVUI/system/load.lua create mode 100644 Interface/AddOns/SVUI/system/media.lua create mode 100644 Interface/AddOns/SVUI/system/registry.lua delete mode 100644 Interface/AddOns/SVUI/system/system.lua delete mode 100644 Interface/AddOns/SVUI/system/updates.lua create mode 100644 Interface/AddOns/SVUI_DebugOMatic/Bindings.xml create mode 100644 Interface/AddOns/SVUI_DebugOMatic/SVUI_DebugOMatic.toc create mode 100644 Interface/AddOns/SVUI_DebugOMatic/SVUI_DebugOMatic.xml create mode 100644 Interface/AddOns/SVUI_DebugOMatic/debug.lua create mode 100644 Interface/AddOns/SVUI_TrackingDevice/artwork/GPS-ARROW.blp diff --git a/Interface/AddOns/SVUI/SVUI.lua b/Interface/AddOns/SVUI/SVUI.lua deleted file mode 100644 index 5a8af64..0000000 --- a/Interface/AddOns/SVUI/SVUI.lua +++ /dev/null @@ -1,991 +0,0 @@ ---[[ -############################################################################## -_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # - ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # - __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # - ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # - ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # - _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # - __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # - _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# - ___\///////////___________\///___________\/////////_____\///////////_# -############################################################################## -S U P E R - V I L L A I N - U I By: Munglunch # -############################################################################## ]]-- ---[[ GLOBALS ]]-- -local _G = _G; -local unpack = _G.unpack; -local select = _G.select; -local pairs = _G.pairs; -local type = _G.type; -local rawset = _G.rawset; -local rawget = _G.rawget; -local tinsert = _G.tinsert; -local tremove = _G.tremove; -local tostring = _G.tostring; -local error = _G.error; -local getmetatable = _G.getmetatable; -local setmetatable = _G.setmetatable; -local string = _G.string; -local math = _G.math; -local table = _G.table; ---[[ STRING METHODS ]]-- -local upper = string.upper; -local format, find, match, gsub = string.format, string.find, string.match, string.gsub; ---[[ MATH METHODS ]]-- -local floor = math.floor ---[[ TABLE METHODS ]]-- -local twipe, tsort, tconcat = table.wipe, table.sort, table.concat; ---[[ -############################################################ - /$$ /$$$$$$ /$$$$$$ /$$$$$$ /$$ /$$$$$$ -| $$ /$$__ $$ /$$__ $$ /$$__ $$| $$ /$$__ $$ -| $$ | $$ \ $$| $$ \__/| $$ \ $$| $$ | $$ \__/ -| $$ | $$ | $$| $$ | $$$$$$$$| $$ | $$$$$$ -| $$ | $$ | $$| $$ | $$__ $$| $$ \____ $$ -| $$ | $$ | $$| $$ $$| $$ | $$| $$ /$$ \ $$ -| $$$$$$$$| $$$$$$/| $$$$$$/| $$ | $$| $$$$$$$$| $$$$$$/ -|________/ \______/ \______/ |__/ |__/|________/ \______/ -############################################################ -]]-- -local SVUI = {}; -local SVUINameSpace, SVUICore = ...; -local SVUIVersion = GetAddOnMetadata(..., "Version"); -local clientVersion, internalVersion, releaseDate, uiVersion = GetBuildInfo(); -local playerName = UnitName("player"); -local playerRealm = GetRealmName(); -local SetAddonCore; -local callbacks = {}; -local numCallbacks = 0; - ---[[ CONSTANTS ]]-- - -BINDING_HEADER_SVUI = "SuperVillain UI"; -SLASH_RELOADUI1 = "/rl" -SLASH_RELOADUI2 = "/reloadui" -SlashCmdList.RELOADUI = ReloadUI - ---[[ MUNGLUNCH's FASTER ASSERT FUNCTION ]]-- - -function enforce(condition, ...) - if not condition then - if next({...}) then - local fn = function (...) return(string.format(...)) end - local s,r = pcall(fn, ...) - if s then - error("Error!: " .. r, 2) - end - end - error("Error!", 2) - end -end -local assert = enforce; ---[[ -###################################################################### - /$$$$$$ /$$ /$$$$$$ /$$$$$$$ /$$$$$$ /$$ /$$$$$$ - /$$__ $$| $$ /$$__ $$| $$__ $$ /$$__ $$| $$ /$$__ $$ -| $$ \__/| $$ | $$ \ $$| $$ \ $$| $$ \ $$| $$ | $$ \__/ -| $$ /$$$$| $$ | $$ | $$| $$$$$$$ | $$$$$$$$| $$ | $$$$$$ -| $$|_ $$| $$ | $$ | $$| $$__ $$| $$__ $$| $$ \____ $$ -| $$ \ $$| $$ | $$ | $$| $$ \ $$| $$ | $$| $$ /$$ \ $$ -| $$$$$$/| $$$$$$$$| $$$$$$/| $$$$$$$/| $$ | $$| $$$$$$$$| $$$$$$/ - \______/ |________/ \______/ |_______/ |__/ |__/|________/ \______/ -###################################################################### -]]-- - ---[[ CLASS COLOR LOCALS ]]-- - -local function formatValueString(text) - if "string" == type(text) then - text = gsub(text,"\n","\\n") - if match(gsub(text,"[^'\"]",""),'^"+$') then - return "'"..text.."'"; - else - return '"'..gsub(text,'"','\\"')..'"'; - end - else - return tostring(text); - end -end -local function formatKeyString(text) - if "string"==type(text) and match(text,"^[_%a][_%a%d]*$") then - return text; - else - return "["..formatValueString(text).."]"; - end -end -local function RegisterCallback(self, m, h) - assert(type(m) == "string" or type(m) == "function", "Bad argument #1 to :RegisterCallback (string or function expected)") - if type(m) == "string" then - assert(type(h) == "table", "Bad argument #2 to :RegisterCallback (table expected)") - assert(type(h[m]) == "function", "Bad argument #1 to :RegisterCallback (m \"" .. m .. "\" not found)") - m = h[m] - end - callbacks[m] = h or true - numCallbacks = numCallbacks + 1 -end -local function UnregisterCallback(self, m, h) - assert(type(m) == "string" or type(m) == "function", "Bad argument #1 to :UnregisterCallback (string or function expected)") - if type(m) == "string" then - assert(type(h) == "table", "Bad argument #2 to :UnregisterCallback (table expected)") - assert(type(h[m]) == "function", "Bad argument #1 to :UnregisterCallback (m \"" .. m .. "\" not found)") - m = h[m] - end - callbacks[m] = nil - numCallbacks = numCallbacks + 1 -end -local function DispatchCallbacks() - if (numCallbacks < 1) then return end - for m, h in pairs(callbacks) do - local ok, err = pcall(m, h ~= true and h or nil) - if not ok then - print("ERROR:", err) - end - end -end - ---[[ BUILD CLASS COLOR GLOBAL ]]-- - -SVUI_CLASS_COLORS = {}; -do - local classes = {}; - local supercolors = { - ["HUNTER"] = { r = 0.454, g = 0.698, b = 0 }, - ["WARLOCK"] = { r = 0.286, g = 0, b = 0.788 }, - ["PRIEST"] = { r = 0.976, g = 1, b = 0.839 }, - ["PALADIN"] = { r = 0.956, g = 0.207, b = 0.733 }, - ["MAGE"] = { r = 0, g = 0.796, b = 1 }, - ["ROGUE"] = { r = 1, g = 0.894, b = 0.117 }, - ["DRUID"] = { r = 1, g = 0.513, b = 0 }, - ["SHAMAN"] = { r = 0, g = 0.38, b = 1 }, - ["WARRIOR"] = { r = 0.698, g = 0.36, b = 0.152 }, - ["DEATHKNIGHT"] = { r = 0.847, g = 0.117, b = 0.074 }, - ["MONK"] = { r = 0.015, g = 0.886, b = 0.38 }, - }; - for class in pairs(RAID_CLASS_COLORS) do - tinsert(classes, class) - end - tsort(classes) - setmetatable(SVUI_CLASS_COLORS,{ - __index = function(t, k) - if k == "RegisterCallback" then return RegisterCallback end - if k == "UnregisterCallback" then return UnregisterCallback end - if k == "DispatchCallbacks" then return DispatchCallbacks end - end - }); - for i, class in ipairs(classes) do - local color = supercolors[class] - local r, g, b = color.r, color.g, color.b - local hex = ("ff%02x%02x%02x"):format(r * 255, g * 255, b * 255) - if not SVUI_CLASS_COLORS[class] or not SVUI_CLASS_COLORS[class].r or not SVUI_CLASS_COLORS[class].g or not SVUI_CLASS_COLORS[class].b then - SVUI_CLASS_COLORS[class] = { - r = r, - g = g, - b = b, - colorStr = hex, - } - end - end - classes = nil -end - ---[[ APPENDED LUA METHODS ]]-- - -function math.parsefloat(value,decimal) - if decimal and decimal > 0 then - local calc1 = 10 ^ decimal; - local calc2 = (value * calc1) + 0.5; - return floor(calc2) / calc1 - end - return floor(value + 0.5) -end - -function table.dump(targetTable) - local dumpTable = {}; - local dumpCheck = {}; - for key,value in ipairs(targetTable) do - tinsert(dumpTable, formatValueString(value)); - dumpCheck[key] = true; - end - for key,value in pairs(targetTable) do - if not dumpCheck[key] then - tinsert(dumpTable, "\n "..formatKeyString(key).." = "..formatValueString(value)); - end - end - local output = tconcat(dumpTable, ", "); - return "{ "..output.." }"; -end - -function table.copy(targetTable,deepCopy,mergeTable) - mergeTable = mergeTable or {}; - if targetTable==nil then return nil end - if mergeTable[targetTable] then return mergeTable[targetTable] end - local replacementTable = {} - for key,value in pairs(targetTable)do - if deepCopy and type(value) == "table" then - replacementTable[key] = table.copy(value, deepCopy, mergeTable) - else - replacementTable[key] = value - end - end - setmetatable(replacementTable, table.copy(getmetatable(targetTable), deepCopy, mergeTable)) - mergeTable[targetTable] = replacementTable; - return replacementTable -end - -function string.trim(this) - return this:find('^%s*$') and '' or this:match('^%s*(.*%S)') -end - -function string.color(this, color) - return ("|cff%s%s|r"):format(color, this) -end - -function string.link(this, prefix, text, color) - text = tostring(text) - local colorstring = tostring(this):color(color or "ffffff") - return ("|H%s:%s|h%s|h"):format(prefix, text, colorstring) -end - -function string.explode(str, delim) - local res = { } - local pattern = string.format("([^%s]+)%s()", delim, delim) - while (true) do - line, pos = str:match(pattern, pos) - if line == nil then break end - table.insert(res, line) - end - return res -end ---[[ -############################################################################### - /$$$$$$$ /$$$$$$$$ /$$$$$$ /$$$$$$ /$$$$$$ /$$$$$$$$/$$$$$$$ /$$ /$$ -| $$__ $$| $$_____/ /$$__ $$|_ $$_/ /$$__ $$|__ $$__/ $$__ $$| $$ /$$/ -| $$ \ $$| $$ | $$ \__/ | $$ | $$ \__/ | $$ | $$ \ $$ \ $$ /$$/ -| $$$$$$$/| $$$$$ | $$ /$$$$ | $$ | $$$$$$ | $$ | $$$$$$$/ \ $$$$/ -| $$__ $$| $$__/ | $$|_ $$ | $$ \____ $$ | $$ | $$__ $$ \ $$/ -| $$ \ $$| $$ | $$ \ $$ | $$ /$$ \ $$ | $$ | $$ \ $$ | $$ -| $$ | $$| $$$$$$$$| $$$$$$/ /$$$$$$| $$$$$$/ | $$ | $$ | $$ | $$ -|__/ |__/|________/ \______/ |______/ \______/ |__/ |__/ |__/ |__/ -############################################################################### -]]-- -do - local ModuleQueue, ScriptQueue = {},{}; - - local INFO_BY = "%s |cff0099FFby %s|r"; - local INFO_VERSION = "%s%s |cff33FF00Version: %s|r"; - local INFO_NAME = "Plugins"; - local INFO_HEADER = "SuperVillain UI (version %.3f): Plugins"; - - if GetLocale() == "ruRU" then - INFO_BY = "%s |cff0099FFот %s|r"; - INFO_VERSION = "%s%s |cff33FF00Версия: %s|r"; - INFO_NAME = "Плагины"; - INFO_HEADER = "SuperVillain UI (устарела %.3f): Плагины"; - end - - local PLUGIN_LISTING = ""; - - local rootstring = function(self) return self.___addonName end - - local changeDBVar = function(self, value, key, sub1, sub2, sub3) - local core = self.___core - local schema = self.___schema - local config = core.db[schema] - - if((sub1 and sub2 and sub3) and (config[sub1] and config[sub1][sub2] and config[sub1][sub2][sub3])) then - core.db[schema][sub1][sub2][sub3][key] = value - elseif((sub1 and sub2) and (config[sub1] and config[sub1][sub2])) then - core.db[schema][sub1][sub2][key] = value - elseif(sub1 and config[sub1]) then - core.db[schema][sub1][key] = value - else - core.db[schema][key] = value - end - - self.db = core.db[schema] - - if(self.UpdateLocals) then - self:UpdateLocals() - end - end - - local innerOnEvent = function(self, event, ...) - local obj = self.module - if self[event] and type(self[event]) == "function" then - self[event](obj, event, ...) - end - end - - local registerEvent = function(self, eventname, eventfunc) - if not self.___eventframe then - self.___eventframe = CreateFrame("Frame", nil) - self.___eventframe.module = self - self.___eventframe:SetScript("OnEvent", innerOnEvent) - end - - if(not self.___eventframe[eventname]) then - local fn = eventfunc - if type(eventfunc) == "string" then - fn = self[eventfunc] - elseif(not fn and self[eventname]) then - fn = self[eventname] - end - self.___eventframe[eventname] = fn - end - - self.___eventframe:RegisterEvent(eventname) - end - - local unregisterEvent = function(self, event, ...) - if(self.___eventframe) then - self.___eventframe:UnregisterEvent(event) - end - end - - local innerOnUpdate = function(self, elapsed) - if self.elapsed and self.elapsed > (self.throttle) then - local obj = self.module - local core = obj.___core - local callbacks = self.callbacks - - for name, fn in pairs(callbacks) do - local _, error = pcall(fn, obj) - if(error and core.Debugging) then - print(error) - end - end - - self.elapsed = 0 - else - self.elapsed = (self.elapsed or 0) + elapsed - end - end - - local registerUpdate = function(self, updatefunc, throttle) - if not self.___updateframe then - self.___updateframe = CreateFrame("Frame", nil); - self.___updateframe.module = self; - self.___updateframe.callbacks = {}; - self.___updateframe.elapsed = 0; - self.___updateframe.throttle = throttle or 0.2; - end - - if(updatefunc and type(updatefunc) == "string" and self[updatefunc]) then - self.___updateframe.callbacks[updatefunc] = self[updatefunc] - end - - self.___updateframe:SetScript("OnUpdate", innerOnUpdate) - end - - local unregisterUpdate = function(self, updatefunc) - if(updatefunc and type(updatefunc) == "string" and self.___updateframe.callbacks[updatefunc]) then - self.___updateframe.callbacks[updatefunc] = nil - if(#self.___updateframe.callbacks == 0) then - self.___updateframe:SetScript("OnUpdate", nil) - end - else - self.___updateframe:SetScript("OnUpdate", nil) - end - end - - local add_OptionsIndex = function(self, index, data) - local addonName = self.___addonName - local schema = self.___schema - local core = self.___core - local header = GetAddOnMetadata(addonName, "X-SVUI-Header") - - core.Options.args.plugins.args.pluginOptions.args[schema].args[index] = data - end - - local function SetPluginString(addonName) - local pluginString = PLUGIN_LISTING or "" - local author = GetAddOnMetadata(addonName, "Author") or "Unknown" - local Pname = GetAddOnMetadata(addonName, "Title") or addonName - local version = GetAddOnMetadata(addonName, "Version") or "???" - pluginString = INFO_BY:format(pluginString, author) - pluginString = ("%s%s"):format(pluginString, Pname) - pluginString = INFO_VERSION:format(pluginString, "|cff00FF00", version) - pluginString = ("%s|r\n"):format(pluginString) - - PLUGIN_LISTING = pluginString - end - - local function SetFoundAddon(core, addonName, lod) - local header = GetAddOnMetadata(addonName, "X-SVUI-Header") - local schema = GetAddOnMetadata(addonName, "X-SVUI-Schema") - - if(lod) then - -- print("ADDON: " .. addonName) - core.Options.args.plugins.args.pluginOptions.args[schema] = { - type = "group", - name = header, - childGroups = "tree", - args = { - enable = { - order = 1, - type = "execute", - width = "full", - name = function() - local nameString = "Disable" - if(not IsAddOnLoaded(addonName)) then - nameString = "Enable" - end - return nameString - end, - func = function() - if(not IsAddOnLoaded(addonName)) then - local loaded, reason = LoadAddOn(addonName) - core:UpdateDatabase() - core.db[schema].enable = true - core.Registry:LoadPackages() - else - core.db[schema].enable = false - core:StaticPopup_Show("RL_CLIENT") - end - end, - } - } - } - else - core.Options.args.plugins.args.pluginOptions.args[schema] = { - type = "group", - name = header, - childGroups = "tree", - args = { - enable = { - order = 1, - type = "execute", - width = "full", - name = function() - local nameString = "Enable" - if(core.db[schema].enable or core.db[schema].enable ~= false) then - nameString = "Disable" - end - return nameString - end, - func = function() - if(not core.db[schema].enable) then - core.db[schema].enable = true - else - core.db[schema].enable = false - end - end, - } - } - } - end - end - - local function SetPluginOptions(core, obj) - local addonName = obj.___addonName - local schema = obj.___schema - local header = obj.___header - local lod = obj.___lod - - if(lod) then - -- print("PLUGIN: " .. addonName) - core.Options.args.plugins.args.pluginOptions.args[schema] = { - type = "group", - name = header, - childGroups = "tree", - args = { - enable = { - order = 1, - type = "execute", - width = "full", - name = function() - local nameString = "Disable" - if(not IsAddOnLoaded(addonName)) then - nameString = "Enable" - end - return nameString - end, - func = function() - if(not IsAddOnLoaded(addonName)) then - local loaded, reason = LoadAddOn(addonName) - core:UpdateDatabase() - obj:ChangeDBVar(true, "enable") - else - obj:ChangeDBVar(false, "enable") - core:StaticPopup_Show("RL_CLIENT") - end - end, - } - } - } - else - core.Options.args.plugins.args.pluginOptions.args[schema] = { - type = "group", - name = header, - childGroups = "tree", - args = { - enable = { - order = 1, - type = "toggle", - name = "Enable", - get = function() return obj.db.enable end, - set = function(key, value) obj:ChangeDBVar(value, "enable") end, - } - } - } - end - end - - local function SetInternalModule(obj, core, schema) - local addonmeta = {} - local oldmeta = getmetatable(obj) - if oldmeta then - for k, v in pairs(oldmeta) do addonmeta[k] = v end - end - addonmeta.__tostring = rootstring - setmetatable( obj, addonmeta ) - - local addonName = ("SVUI [%s]"):format(schema) - - obj.___addonName = addonName - obj.___schema = schema - obj.___core = core - - obj.initialized = false - obj.CombatLocked = false - obj.ChangeDBVar = changeDBVar - obj.RegisterEvent = registerEvent - obj.UnregisterEvent = unregisterEvent - obj.RegisterUpdate = registerUpdate - obj.UnregisterUpdate = unregisterUpdate - - return obj - end - - local function SetExternalModule(obj, core, schema, addonName, header, lod) - local addonmeta = {} - local oldmeta = getmetatable(obj) - if oldmeta then - for k, v in pairs(oldmeta) do addonmeta[k] = v end - end - addonmeta.__tostring = rootstring - setmetatable( obj, addonmeta ) - - obj.___addonName = addonName - obj.___schema = schema - obj.___header = header - obj.___core = core - obj.___lod = lod - - obj.initialized = false - obj.CombatLocked = false - obj.ChangeDBVar = changeDBVar - obj.RegisterEvent = registerEvent - obj.UnregisterEvent = unregisterEvent - obj.RegisterUpdate = registerUpdate - obj.UnregisterUpdate = unregisterUpdate - obj.AddOption = add_OptionsIndex - - return obj - end - - local Registry_NewCallback = function(self, fn) - if(fn and type(fn) == "function") then - self.Callbacks[#self.Callbacks+1] = fn - end - end - - local Registry_NewScript = function(self, fn) - if(fn and type(fn) == "function") then - ScriptQueue[#ScriptQueue+1] = fn - end - end - - local Registry_NewPackage = function(self, obj, schema) - local core = self.___core - if(core[schema]) then return end - - ModuleQueue[#ModuleQueue+1] = schema - self.Modules[#self.Modules+1] = schema - - core[schema] = SetInternalModule(obj, core, schema) - - if(core.AddonLaunched) then - if(core[schema].Load) then - core[schema]:Load() - end - end - end - - local Registry_NewPlugin = function(self, obj) - local core = self.___core - local coreName = core.___addonName - local addonName = obj.___addonName - - if(addonName and addonName ~= coreName) then - local schema = GetAddOnMetadata(addonName, "X-SVUI-Schema"); - local header = GetAddOnMetadata(addonName, "X-SVUI-Header"); - local lod = IsAddOnLoadOnDemand(addonName) - if(not schema) then return end - - ModuleQueue[#ModuleQueue+1] = schema - self.Modules[#self.Modules+1] = schema - - SetPluginString(addonName) - - core[schema] = SetExternalModule(obj, core, schema, addonName, header, lod) - - SetPluginOptions(core, obj) - - if(core.AddonLaunched and core[schema].Load) then - core[schema]:Load() - end - end - end - - local Registry_FetchAddons = function(self) - local addonCount = GetNumAddOns() - local core = self.___core - - for i = 1, addonCount do - local addonName, _, _, _, _, reason = GetAddOnInfo(i) - local lod = IsAddOnLoadOnDemand(i) - local schema = GetAddOnMetadata(i, "X-SVUI-Schema") - - if(lod and schema) then - self.Addons[addonName] = schema; - SetFoundAddon(core, addonName, lod) - end - end - end - - local Registry_RunCallbacks = function(self) - local callbacks = self.Callbacks - for i=1, #callbacks do - local fn = callbacks[i] - if(fn and type(fn) == "function") then - fn() - end - end - end - - local Registry_Update = function(self, name, dataOnly) - local core = self.___core - local obj = core[name] - if obj then - if core.db[name] then - obj.db = core.db[name] - end - if obj.ReLoad and not dataOnly then - obj:ReLoad() - end - end - end - - local Registry_UpdateAll = function(self) - local modules = self.Modules - local core = self.___core - for _,name in pairs(modules) do - local obj = core[name] - - if core.db[name] then - obj.db = core.db[name] - end - - if obj and obj.ReLoad then - obj:ReLoad() - end - end - end - - local Registry_LoadOnDemand = function(self) - local core = self.___core - local addons = self.Addons - for name,schema in pairs(addons) do - local config = core.db[schema] - if(config and (config.enable or config.enable ~= false)) then - if(not IsAddOnLoaded(name)) then - local loaded, reason = LoadAddOn(name) - end - EnableAddOn(name) - end - end - end - - local Registry_Load = function(self) - if not ModuleQueue then return end - local core = self.___core - - for i=1,#ModuleQueue do - local name = ModuleQueue[i] - local obj = core[name] - if obj and not obj.initialized then - if core.db[name] then - obj.db = core.db[name] - end - - -- if obj.___lod then - -- print(table.dump(core.db[name])) - -- end - - if obj.Load then - local halt = false - if(obj.db.incompatible) then - for addon,_ in pairs(obj.db.incompatible) do - if IsAddOnLoaded(addon) then halt = true end - end - end - if(not halt) then - obj:Load() - obj.Load = nil - end - end - obj.initialized = true; - end - end - - twipe(ModuleQueue) - - if not ScriptQueue then return end - for i=1, #ScriptQueue do - local fn = ScriptQueue[i] - if(fn and type(fn) == "function") then - fn() - end - end - - ScriptQueue = nil - end - - --[[ GLOBAL NAMESPACE ]]-- - - function SetAddonCore(obj) - local version = GetAddOnMetadata(SVUINameSpace, "Version") - local schema = GetAddOnMetadata(SVUINameSpace, "X-SVUI-Schema") - - obj = { - ___addonName = SVUINameSpace, - ___version = version, - ___schema = schema, - ___interface = tonumber(uiVersion), - db = {}, - Global = { - Accountant = {}, - profiles = {}, - profileKeys = {}, - }, - Configs = {}, - Media = {}, - DisplayAudit = {}, - DynamicOptions = {}, - Dispellable = {}, - Snap = {}, - Options = { - type = "group", - name = "|cff339fffConfig-O-Matic|r", - args = { - plugins = { - order = -2, - type = "group", - name = "Plugins", - childGroups = "tab", - args = { - pluginheader = { - order = 1, - type = "header", - name = "SuperVillain Plugins", - }, - pluginOptions = { - order = 2, - type = "group", - name = "", - args = { - pluginlist = { - order = 1, - type = "group", - name = "Summary", - args = { - active = { - order = 1, - type = "description", - name = function() return PLUGIN_LISTING end - } - } - }, - } - } - } - } - } - }, - Registry = { - Modules = {}, - Addons = {}, - Callbacks = {}, - INFO_VERSION = INFO_VERSION, - INFO_NEW = INFO_NEW, - INFO_NAME = INFO_NAME, - INFO_HEADER = INFO_HEADER, - NewCallback = Registry_NewCallback, - NewScript = Registry_NewScript, - NewPackage = Registry_NewPackage, - NewPlugin = Registry_NewPlugin, - FindAddons = Registry_FetchAddons, - LoadRegisteredAddons = Registry_LoadOnDemand, - RunCallbacks = Registry_RunCallbacks, - Update = Registry_Update, - UpdateAll = Registry_UpdateAll, - LoadPackages = Registry_Load, - } - } - local mt = {} - local old = getmetatable(obj) - if old then - for k, v in pairs(old) do mt[k] = v end - end - mt.__tostring = rootstring - setmetatable(obj, mt) - - obj.Registry.___core = obj - - return obj - end -end - ---[[ LOCALIZATION HELPERS ]]-- - -local failsafe = function() assert(false) end - -local metaread = { - __index = function(self, key) - rawset(self, key, key) - return key - end -} - -local activeLocale - -local defaultwrite = setmetatable({}, { - __newindex = function(self, key, value) - if not rawget(activeLocale, key) then - rawset(activeLocale, key, value == true and key or value) - end - end, - __index = failsafe -}) - -local metawrite = setmetatable({}, { - __newindex = function(self, key, value) - rawset(activeLocale, key, value == true and key or value) - end, - __index = failsafe -}) ---[[ -########################################################## - /$$$$$$ /$$$$$$ /$$$$$$$ /$$$$$$$$ - /$$__ $$ /$$__ $$| $$__ $$| $$_____/ -| $$ \__/| $$ \ $$| $$ \ $$| $$ -| $$ | $$ | $$| $$$$$$$/| $$$$$ -| $$ | $$ | $$| $$__ $$| $$__/ -| $$ $$| $$ | $$| $$ \ $$| $$ -| $$$$$$/| $$$$$$/| $$ | $$| $$$$$$$$ - \______/ \______/ |__/ |__/|________/ -########################################################## -]]-- -SVUI = SetAddonCore(SVUI) - -SVUI.Localization = setmetatable({}, metaread) - ---[[ MISC ]]-- - -SVUI.fubar = function() return end -SVUI.class = select(2,UnitClass("player")); -SVUI.ClassRole = ""; -SVUI.UnitRole = "NONE"; -SVUI.ConfigurationMode = false; -SVUI.DebuggingMode = false - ---[[ UTILITY FRAMES ]]-- - -SVUI.UIParent = CreateFrame("Frame", "SVUIParent", UIParent); -SVUI.UIParent:SetFrameLevel(UIParent:GetFrameLevel()); -SVUI.UIParent:SetPoint("CENTER", UIParent, "CENTER"); -SVUI.UIParent:SetSize(UIParent:GetSize()); -SVUI.Snap[1] = SVUI.UIParent; - -SVUI.Cloaked = CreateFrame("Frame", nil, UIParent); -SVUI.Cloaked:Hide(); - ---[[ COMMON FUNCTIONS ]]-- - -function SVUI:SetLocaleStrings(locale, isDefault) - local gameLocale = GetLocale() - if gameLocale == "enGB" then gameLocale = "enUS" end - - activeLocale = self.Localization - - if isDefault then - return defaultwrite - elseif(locale == GAME_LOCALE or locale == gameLocale) then - return metawrite - end -end - -function SVUI:Prototype(name) - local version = GetAddOnMetadata(name, "Version") - local schema = GetAddOnMetadata(name, "X-SVUI-Schema") - - self.Configs[schema] = {["enable"] = false} - - local obj = { - ___addonName = name, - ___version = version, - ___schema = schema - } - - local mt = {} - local old = getmetatable(obj) - if old then - for k, v in pairs(old) do mt[k] = v end - end - mt.__tostring = rootstring - setmetatable(obj, mt) - return obj -end - -do - local messagePattern = "|cffFF2F00%s:|r" - local debugPattern = "|cffFF2F00%s|r [|cff992FFF%s|r]|cffFF2F00:|r" - - local function _sendmessage(msg, prefix) - if(type(msg) == "table") then - msg = tostring(msg) - end - - if(not msg) then return end - - if(prefix) then - local outbound = ("%s %s"):format(prefix, msg); - print(outbound) - else - print(msg) - end - end - - function SVUI:Debugger(msg) - if(not self.DebuggingMode) then return end - local outbound = (debugPattern):format("SVUI", "DEBUG") - _sendmessage(msg, outbound) - end - - function SVUI:AddonMessage(msg) - local outbound = (messagePattern):format("SVUI") - _sendmessage(msg, outbound) - end -end - -SVUICore[1] = SVUI -SVUICore[2] = SVUI.Localization - ---[[ SET MASTER GLOBAL ]]-- - -_G[SVUINameSpace] = SVUICore; - --- TESTING INTERFACE METADATA --- /script print(SVUI[1].___interface) \ No newline at end of file diff --git a/Interface/AddOns/SVUI/SVUI.toc b/Interface/AddOns/SVUI/SVUI.toc index ddd855c..c56e174 100644 --- a/Interface/AddOns/SVUI/SVUI.toc +++ b/Interface/AddOns/SVUI/SVUI.toc @@ -6,10 +6,8 @@ ## SavedVariables: SVUI_Global ## SavedVariablesPerCharacter: SVUI_Profile, SVUI_Cache ## OptionalDeps: Blizzard_DebugTools, Blizzard_PetJournal, SharedMedia -## X-oUF: oUF_SuperVillain +## X-oUF: oUF_Villain ## X-Notes: Special thanks to Elv and Tukz for their incredible work. ## X-Email: munglunch@gmail.com -## X-SVUI-Header: Super Villain UI -## X-SVUI-Schema: SuperVillain SVUI.xml diff --git a/Interface/AddOns/SVUI/SVUI.xml b/Interface/AddOns/SVUI/SVUI.xml index a162118..b5ad17a 100644 --- a/Interface/AddOns/SVUI/SVUI.xml +++ b/Interface/AddOns/SVUI/SVUI.xml @@ -95,7 +95,8 @@ -