diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 33755da..b95d8c2 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -9,13 +9,13 @@ on: jobs: release: - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 env: GITHUB_OAUTH: ${{ secrets.GITHUB_TOKEN }} CF_API_KEY: ${{ secrets.CF_API_KEY }} WAGO_API_TOKEN: ${{ secrets.WAGO_API_TOKEN }} steps: - name: Clone project - uses: actions/checkout@v1 + uses: actions/checkout@v4 - name: Package - uses: BigWigsMods/packager@v2 + uses: BigWigsMods/packager@master diff --git a/ProjectAzilroka/Modules/SquareMinimapButtons.lua b/ProjectAzilroka/Modules/SquareMinimapButtons.lua index e65abbe..99e1232 100644 --- a/ProjectAzilroka/Modules/SquareMinimapButtons.lua +++ b/ProjectAzilroka/Modules/SquareMinimapButtons.lua @@ -53,7 +53,7 @@ SMB.IgnoreButton = { } local ButtonFunctions = { 'SetParent', 'ClearAllPoints', 'SetPoint', 'SetSize', 'SetScale', 'SetIgnoreParentScale', 'SetFrameStrata', 'SetFrameLevel' } -local RemoveTextureID = { [136430] = true, [136467] = true, [136477] = true, [136468] = true, [130924] = true } +local RemoveTextureID = { ['136430'] = true, ['136467'] = true, ['136477'] = true, ['136468'] = true, ['130924'] = true } -- , ['982840'] = true, ['132321'] = true local CheckTexture = { '[iI][cC][oO][nN]$', '[tT][eE][xX][tT][uU][rR][eE]' } local SpecialTexCoords = { ['TomCats-MinimapButton'] = { 0, .64, 0, .64 } } @@ -276,10 +276,8 @@ function SMB:HandleBlizzardButtons() end function SMB:HandleRegion(button, region) - local texture = region.GetTextureFileID and region:GetTextureFileID() - if not texture then - texture = strlower(tostring(region:GetTexture())) - end + local texture = region.GetTextureFileID and region:GetTextureFileID() or region.GetTexture and region:GetTexture() + if not texture then return end region:ClearAllPoints() region:SetDrawLayer('ARTWORK') @@ -300,14 +298,13 @@ end function SMB:SkinMinimapButton(button) for _, frames in next, { button, button:GetChildren() } do for _, region in next, { frames:GetRegions() } do - if SMB:CheckTexture(region:GetDebugName()) then - SMB:HandleRegion(button, region) - elseif region.IsObjectType and region:IsObjectType('Texture') then - if SMB:CheckTexture(region:GetTextureFileID()) then - SMB:HandleRegion(button, region) - else + if region.IsObjectType and region:IsObjectType('Texture') then + local texture = region.GetTextureFileID and region:GetTextureFileID() or region.GetTexture and region:GetTexture() + if texture and SMB:RemoveTexture(texture) then region:SetTexture() region:SetAlpha(0) + else + SMB:HandleRegion(button, region) end end end diff --git a/ProjectAzilroka/Modules/stAddonManager.lua b/ProjectAzilroka/Modules/stAddonManager.lua index de419c3..4f832f5 100644 --- a/ProjectAzilroka/Modules/stAddonManager.lua +++ b/ProjectAzilroka/Modules/stAddonManager.lua @@ -75,13 +75,13 @@ function stAMCheckButtonMixin:OnLoad() end function stAMCheckButtonMixin:OnClick() - if self.name then - if PA:IsAddOnEnabled(self.name, stAM.SelectedCharacter) then - DisableAddOn(self.name, stAM.SelectedCharacter) + if self.addonInfo.Name then + if PA:IsAddOnEnabled(self.addonInfo.Name, stAM.SelectedCharacter) then + DisableAddOn(self.addonInfo.Name, stAM.SelectedCharacter) else - EnableAddOn(self.name, stAM.SelectedCharacter) - if stAM.db.EnableRequiredAddons and self.required then - for _, AddOn in next, self.required do + EnableAddOn(self.addonInfo.Name, stAM.SelectedCharacter) + if stAM.db.EnableRequiredAddons and self.addonInfo.Required then + for _, AddOn in next, self.addonInfo.Required do EnableAddOn(AddOn) end end @@ -94,19 +94,20 @@ end function stAMCheckButtonMixin:OnEnter() GameTooltip:SetOwner(self, 'ANCHOR_TOPRIGHT', 0, 4) GameTooltip:ClearLines() - GameTooltip:AddDoubleLine('AddOn:', self.title, 1, 1, 1, 1, 1, 1) - GameTooltip:AddDoubleLine(ACL['Authors:'], self.authors, 1, 1, 1, 1, 1, 1) - GameTooltip:AddDoubleLine(ACL['Version:'], self.version, 1, 1, 1, 1, 1, 1) - if self.notes ~= nil then - GameTooltip:AddDoubleLine('Notes:', self.notes, 1, 1, 1, 1, 1, 1) + GameTooltip:AddDoubleLine('AddOn:', self.addonInfo.Title, 1, 1, 1, 1, 1, 1) + GameTooltip:AddDoubleLine(ACL['Version:'], self.addonInfo.Version, 1, 1, 1, 1, 1, 1) + GameTooltip:AddLine(' ') + GameTooltip:AddDoubleLine(ACL['Authors:'], self.addonInfo.Authors, 1, 1, 1, 1, 1, 1) + if self.addonInfo.Notes ~= nil then + GameTooltip:AddDoubleLine('Notes:', self.addonInfo.Notes, 1, 1, 1, 1, 1, 1) end - if self.required or self.optional then + if self.addonInfo.Required or self.addonInfo.Optional then GameTooltip:AddLine(' ') - if self.required then - GameTooltip:AddDoubleLine('Required Dependencies:', concat(self.required, ', '), 1, 1, 1, 1, 1, 1) + if self.addonInfo.Required then + GameTooltip:AddDoubleLine('Required Dependencies:', concat(self.addonInfo.Required, ', '), 1, 1, 1, 1, 1, 1) end - if self.optional then - GameTooltip:AddDoubleLine('Optional Dependencies:', concat(self.optional, ', '), 1, 1, 1, 1, 1, 1) + if self.addonInfo.Optional then + GameTooltip:AddDoubleLine('Optional Dependencies:', concat(self.addonInfo.Optional, ', '), 1, 1, 1, 1, 1, 1) end end GameTooltip:Show() @@ -581,11 +582,10 @@ function stAM:UpdateAddonList() for i, button in ipairs(stAM.Frame.AddOns.Buttons) do local addonIndex = (not stAM.searchQuery and (stAM.scrollOffset + i)) or stAM.Frame.Search.AddOns[stAM.scrollOffset + i] local info = stAM.AddOnInfo[addonIndex] + button.addonInfo = info if addonIndex and addonIndex <= #stAM.AddOnInfo then - button.name, button.title, button.authors, button.version, button.notes, button.required, button.optional, button.icon, button.atlas = info.Name, info.Title, info.Authors, info.Version, info.Notes, info.Required, info.Optional, info.Icon, info.Atlas - - button.Text:SetText(info.Title) + button.Text:SetFormattedText('%s (%s)', info.Title, info.Version) if info.Icon then button.Icon:SetTexture(info.Icon)