Skip to content

Commit

Permalink
Fix luacheck errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Gethe committed Oct 7, 2022
1 parent 4a4592f commit 79653c2
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 27 deletions.
14 changes: 6 additions & 8 deletions Skin/Classic/Interface/FrameXML/OverrideActionBar.lua
Original file line number Diff line number Diff line change
Expand Up @@ -13,24 +13,22 @@ local Color, Util = Aurora.Color, Aurora.Util
do --[[ FrameXML\OverrideActionBar.lua ]]
-- 534043 - Default
function Hook.OverrideActionBar_SetSkin(skin)
print("OverrideActionBar_SetSkin", skin)
local OverrideActionBar = _G.OverrideActionBar
OverrideActionBar.Divider2:SetColorTexture(1, 1, 1)
OverrideActionBar.Divider3:SetColorTexture(1, 1, 1)
end
function Hook.OverrideActionBar_CalcSize()
print("OverrideActionBar_CalcSize", OverrideActionBar.HasExit, OverrideActionBar.HasPitch)
local OverrideActionBar = _G.OverrideActionBar
local width, xpWidth, anchor, buttonAnchor;
local anchor

if OverrideActionBar.HasExit and OverrideActionBar.HasPitch then
width, xpWidth, anchor, buttonAnchor = 1020, 580, 103, -234;
anchor = 103
elseif OverrideActionBar.HasPitch then
width, xpWidth, anchor, buttonAnchor = 945, 500, 145, -192;
anchor = 145
elseif OverrideActionBar.HasExit then
width, xpWidth, anchor, buttonAnchor = 930, 490, 60, -277;
anchor = 60
else
width, xpWidth, anchor, buttonAnchor = 860, 460, 100, -237;
anchor = 100
end

OverrideActionBar.Divider2:SetPoint("BOTTOM", anchor, 13)
Expand All @@ -50,7 +48,7 @@ function private.FrameXML.OverrideActionBar()
OverrideActionBar.EndCapR:Hide()

OverrideActionBar.Divider2:SetSize(1, 59)

OverrideActionBar._BG:Hide()
OverrideActionBar.MicroBGL:Hide()
OverrideActionBar._MicroBGMid:Hide()
Expand Down
5 changes: 2 additions & 3 deletions Skin/Retail/Interface/SharedXML/DeprecatedTemplates.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,8 @@ if private.shouldSkip() then return end

--[[ Core ]]
local Aurora = private.Aurora
local Base = Aurora.Base
local Hook, Skin = Aurora.Hook, Aurora.Skin
local Color, Util = Aurora.Color, Aurora.Util
local Skin = Aurora.Skin
local Color = Aurora.Color

do --[[ SharedXML\DeprecatedTemplates.lua ]]
function Skin.OptionsBaseCheckButtonTemplate(CheckButton)
Expand Down
1 change: 0 additions & 1 deletion Skin/Retail/Interface/SharedXML/OptionsPanelTemplates.lua
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ if private.isPatch then return end
--[[ Core ]]
local Aurora = private.Aurora
local Skin = Aurora.Skin
local Color = Aurora.Color

--do --[[ FrameXML\OptionsPanelTemplates.lua ]]
--end
Expand Down
31 changes: 16 additions & 15 deletions dev/test.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1538,15 +1538,16 @@ function commands.test()
}
end

if C_ProfSpecs then -- Trade Skills
function C_ProfSpecs.GetSpecTabInfo() return {enabled=true, errorReason=""} end
function C_ProfSpecs.ShouldShowSpecTab() return true end
function C_ProfSpecs.SkillLineHasSpecialization() return true end
function C_ProfSpecs.GetConfigIDForSkillLine() return -1 end
LoadAddOn('Blizzard_Professions')
local s=ProfessionsFrame.SpecPage
function s:GetConfigID() return C_ClassTalents.GetActiveConfigID() end
function s:GetProfessionID()
if _G.C_ProfSpecs then -- Trade Skills
function _G.C_ProfSpecs.GetSpecTabInfo() return {enabled=true, errorReason=""} end
function _G.C_ProfSpecs.ShouldShowSpecTab() return true end
function _G.C_ProfSpecs.SkillLineHasSpecialization() return true end
function _G.C_ProfSpecs.GetConfigIDForSkillLine() return -1 end
_G.LoadAddOn('Blizzard_Professions')

local s=_G.ProfessionsFrame.SpecPage
function s:GetConfigID() return _G.C_ClassTalents.GetActiveConfigID() end
function s:GetProfessionID()
-- return 2822 -- Blacksmithing
return 2823 -- Alchemy
-- return 2824 -- Cooking
Expand Down Expand Up @@ -1577,7 +1578,7 @@ function commands.test()
true
}
local skillInfo, lastHeader = {}, 1
function GetTradeSkillInfo(skillIndex)
function _G.GetTradeSkillInfo(skillIndex)
if not skillInfo[skillIndex] then
local skillTypeIndex = random(1, MAX_SKILL_TYPES)
if skillIndex == 1 then
Expand Down Expand Up @@ -1610,19 +1611,19 @@ function commands.test()
end
return unpack(skillInfo[skillIndex])
end
function ExpandTradeSkillSubClass(id)
function _G.ExpandTradeSkillSubClass(id)
skillInfo[id][4] = true
for k, v in skillInfo[id].items do
skillInfo[id][k] = false
end
end
function CollapseTradeSkillSubClass(id)
function _G.CollapseTradeSkillSubClass(id)
skillInfo[id][4] = false
for k, v in skillInfo[id].items do
skillInfo[id][k] = false
end
end
function GetNumTradeSkills()
function _G.GetNumTradeSkills()
return 16
end
end
Expand All @@ -1643,7 +1644,7 @@ function commands.test()
end
end

function GetTargetTradeMoney()
function _G.GetTargetTradeMoney()
return 123456
end

Expand Down Expand Up @@ -1696,7 +1697,7 @@ function commands.test()
desc = "TradeFrame",
type = "execute",
func = function()
TradeFrame_OnEvent(TradeFrame, "TRADE_SHOW")
_G.TradeFrame_OnEvent(_G.TradeFrame, "TRADE_SHOW")
end,
},
},
Expand Down

0 comments on commit 79653c2

Please sign in to comment.