Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Azilroka committed Aug 12, 2024
1 parent d0fe076 commit b08191b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 21 deletions.
14 changes: 0 additions & 14 deletions AddOnSkins/Core/Core.lua
Original file line number Diff line number Diff line change
Expand Up @@ -62,20 +62,6 @@ function AS:GetClassColor(class)
return color
end

function AS:OrderedPairs(t, f)
local a = {}
for n in pairs(t) do tinsert(a, n) end
sort(a, f)
local i = 0
local iter = function()
i = i + 1
if a[i] == nil then return nil
else return a[i], t[a[i]]
end
end
return iter
end

function AS:Delay(delay, func)
C_Timer.After(delay, func)
end
Expand Down
14 changes: 7 additions & 7 deletions AddOnSkins/Init.lua
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
local _G = _G
local select = select
local format = format
local strlower = strlower
local CreateFrame = CreateFrame
local GetAddOnEnableState = GetAddOnEnableState
local GetAddOnInfo = GetAddOnInfo
local GetAddOnMetadata = C_AddOns and C_AddOns.GetAddOnMetadata or GetAddOnMetadata
local GetNumAddOns = GetNumAddOns
local GetAddOnEnableState = C_AddOns.GetAddOnEnableState
local GetAddOnInfo = C_AddOns.GetAddOnInfo
local GetAddOnMetadata = C_AddOns.GetAddOnMetadata
local GetNumAddOns = C_AddOns.GetNumAddOns
local GetRealmName = GetRealmName
local UIParent = UIParent
local UnitClass = UnitClass
Expand All @@ -15,6 +14,7 @@ local UnitFactionGroup = UnitFactionGroup

local AddOnName, Engine = ...
local AS = _G.LibStub('AceAddon-3.0'):NewAddon('AddOnSkins', 'AceConsole-3.0', 'AceEvent-3.0', 'AceHook-3.0', 'AceTimer-3.0')
local _

AS.EmbedSystem = AS:NewModule('EmbedSystem', 'AceEvent-3.0', 'AceHook-3.0')
AS.Skins = AS:NewModule('Skins', 'AceTimer-3.0', 'AceHook-3.0', 'AceEvent-3.0')
Expand Down Expand Up @@ -51,8 +51,8 @@ AS.Version = tonumber(GetAddOnMetadata(AddOnName, 'Version'))
AS.Authors = GetAddOnMetadata(AddOnName, 'Author'):gsub(", ", " ")
AS.ProperVersion = format('%.2f', AS.Version)
AS.TicketTracker = 'https://github.com/Azilroka/AddOnSkins/issues'
AS.MyClass = select(2, UnitClass('player'))
AS.MyName = UnitName('player')
AS.MyClass = UnitClass('player')
_, AS.MyName = UnitName('player')
AS.MyRealm = GetRealmName()
AS.Noop = function() end
AS.TexCoords = { .075, .925, .075, .925 }
Expand Down

0 comments on commit b08191b

Please sign in to comment.