Skip to content

Commit

Permalink
Begin adding support for Burning Crusade Classic.
Browse files Browse the repository at this point in the history
  • Loading branch information
Ravendwyr committed May 16, 2021
1 parent a701e86 commit 3d5f3f7
Show file tree
Hide file tree
Showing 9 changed files with 80 additions and 33 deletions.
26 changes: 19 additions & 7 deletions .github/workflows/upload.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,33 @@ jobs:
package:
runs-on: ubuntu-latest

env:
CF_API_KEY: ${{ secrets.CF_API_KEY }}
WOWI_API_TOKEN: ${{ secrets.WOWI_API_TOKEN }}
GITHUB_OAUTH: ${{ secrets.GITHUB_TOKEN }}

steps:
- name: Download Repository
uses: actions/checkout@v1
uses: actions/checkout@v2
with:
fetch-depth: 50

- name: Create Package for Classic
uses: BigWigsMods/packager@master
with:
args: -g 1.13.6
args: -g classic
env:
CF_API_KEY: ${{ secrets.CF_API_KEY }}
GITHUB_OAUTH: ${{ secrets.GITHUB_TOKEN }}
WOWI_API_TOKEN: ${{ secrets.WOWI_API_TOKEN }}

- name: Create Package for Burning Crusade Classic
uses: BigWigsMods/packager@master
with:
args: -g bcc
env:
CF_API_KEY: ${{ secrets.CF_API_KEY }}
GITHUB_OAUTH: ${{ secrets.GITHUB_TOKEN }}
WOWI_API_TOKEN: ${{ secrets.WOWI_API_TOKEN }}

- name: Create Package for Retail
uses: BigWigsMods/packager@master
env:
CF_API_KEY: ${{ secrets.CF_API_KEY }}
GITHUB_OAUTH: ${{ secrets.GITHUB_TOKEN }}
WOWI_API_TOKEN: ${{ secrets.WOWI_API_TOKEN }}
17 changes: 15 additions & 2 deletions Chinchilla.lua
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,23 @@ function Chinchilla:Minimap_OnMouseUp(this, button, ...)
end
end


function Chinchilla:IsRetail()
-- One...
return WOW_PROJECT_ID == WOW_PROJECT_MAINLINE
end

function Chinchilla:IsClassic()
-- Two...
return WOW_PROJECT_ID == WOW_PROJECT_CLASSIC
end

function Chinchilla:IsBurningCrusade()
-- Five!
return WOW_PROJECT_ID == WOW_PROJECT_BURNING_CRUSADE_CLASSIC
end


function Chinchilla:OpenConfig()
AceConfigDialog:Open("Chinchilla")
end
Expand Down Expand Up @@ -208,7 +221,7 @@ function Chinchilla:OnEnable()
MinimapBorderTop:Hide()
MinimapZoneTextButton:Hide()

if self:IsClassic() then
if self:IsClassic() or self:IsBurningCrusade() then
MinimapToggleButton:Hide()
end

Expand All @@ -224,7 +237,7 @@ function Chinchilla:OnDisable()
MinimapBorderTop:Show()
MinimapZoneTextButton:Show()

if self:IsClassic() then
if self:IsClassic() or self:IsBurningCrusade() then
MinimapToggleButton:Show()
end

Expand Down
7 changes: 2 additions & 5 deletions Chinchilla.toc
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
#@retail@
## Interface: 90005
#@end-retail@
#@non-retail@
# ## Interface: 11306
#@end-non-retail@
## Interface-Classic: 11307
## Interface-BCC: 20501
## Title: Chinchilla Minimap
## Notes: Minimap addon of awesomeness. *chewing sound*. It'll nibble your hay pellets.
## Notes-frFR: Minicarte incroyablement incroyable. *bruit de mastication*. Il va grignoter votre foin.
Expand Down
13 changes: 8 additions & 5 deletions Modules/Appearance.lua
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ function Appearance:OnEnable()

-- Removes the circular "waffle-like" texture that shows when using a non-circular minimap in the blue quest objective area.
-- Thank you Funkeh` for the code!
if not Chinchilla:IsClassic() then
if Chinchilla:IsRetail() then
Minimap:SetArchBlobRingScalar(0)
Minimap:SetArchBlobRingAlpha(0)
Minimap:SetQuestBlobRingScalar(0)
Expand All @@ -108,8 +108,11 @@ function Appearance:OnDisable()
MinimapBorder:Show()
Minimap:SetAlpha(1)

if Chinchilla:IsClassic() then Minimap:SetMaskTexture("Textures\\MinimapMask")
else Minimap:SetMaskTexture(186178) end
if Chinchilla:IsClassic() or Chinchilla:IsBurningCrusade() then
Minimap:SetMaskTexture("Textures\\MinimapMask")
else
Minimap:SetMaskTexture(186178)
end

for _, v in ipairs(cornerTextures) do
v:Hide()
Expand All @@ -119,7 +122,7 @@ function Appearance:OnDisable()
Chinchilla:GetModule("MoveButtons"):Update()
end

if not Chinchilla:IsClassic() then
if Chinchilla:IsRetail() then
Minimap:SetArchBlobRingScalar(1)
Minimap:SetArchBlobRingAlpha(1)
Minimap:SetQuestBlobRingScalar(1)
Expand Down Expand Up @@ -236,7 +239,7 @@ function Appearance:SetScale(value)

Minimap:SetScale(value)

if Chinchilla:IsClassic() then
if Chinchilla:IsClassic() or Chinchilla:IsBurningCrusade() then
QuestWatchFrame:GetSize()
else
ObjectiveTrackerFrame:GetSize()
Expand Down
19 changes: 15 additions & 4 deletions Modules/MoveButtons.lua
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,17 @@ function MoveButtons:OnInitialize()
zoomIn = MinimapZoomIn,
zoomOut = MinimapZoomOut,
}
elseif Chinchilla:IsBurningCrusade() then
buttons = {
map = MiniMapWorldMapButton,
mail = MiniMapMailFrame,
dayNight = GameTimeFrame,
clock = TimeManagerClockButton,
track = MiniMapTracking,
voice = MiniMapVoiceChatFrame,
zoomIn = MinimapZoomIn,
zoomOut = MinimapZoomOut,
}
else
buttons = {
difficulty = MiniMapInstanceDifficulty,
Expand Down Expand Up @@ -282,12 +293,12 @@ end
function MoveButtons:OnEnable()
self:SetLocked()
self:Update()
if not Chinchilla:IsClassic() and not Chinchilla:IsHooked("QueueStatusFrame_Update") then

if Chinchilla:IsRetail() and not Chinchilla:IsHooked("QueueStatusFrame_Update") then
Chinchilla:SecureHook("QueueStatusFrame_Update", PositionLFD)
end
if not Chinchilla:IsClassic() then

if Chinchilla:IsRetail() then
self:RegisterEvent("GARRISON_SHOW_LANDING_PAGE")
end
end
Expand Down
12 changes: 6 additions & 6 deletions Modules/Position.lua
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ function Position:OnInitialize()
}
})

if Chinchilla:IsClassic() then
if Chinchilla:IsClassic() or Chinchilla:IsBurningCrusade() then
nameToFrame = {
minimap = Minimap,
durability = DurabilityFrame,
Expand Down Expand Up @@ -156,7 +156,7 @@ function Position:OnEnable()
self:SetFramePosition('questWatch')
self:SetFramePosition('ticketStatus')

if not Chinchilla:IsClassic() then
if Chinchilla:IsRetail() then
self:SetFramePosition('boss')
self:SetFramePosition('vehicleSeats')
end
Expand All @@ -173,7 +173,7 @@ function Position:OnEnable()
self:SecureHook(DurabilityFrame, "SetPoint", "DurabilityFrame_SetPoint")
self:SecureHook(TicketStatusFrame, "SetPoint", "TicketStatusFrame_SetPoint")

if Chinchilla:IsClassic() then
if Chinchilla:IsClassic() or Chinchilla:IsBurningCrusade() then
self:SecureHook(QuestWatchFrame, "SetPoint", "WatchFrame_SetPoint")
else
self:SecureHook(VehicleSeatIndicator, "SetPoint", "VehicleSeatIndicator_SetPoint")
Expand All @@ -199,7 +199,7 @@ function Position:OnDisable()
self:SetFramePosition('questWatch')
self:SetFramePosition('ticketStatus')

if not Chinchilla:IsClassic() then
if Chinchilla:IsRetail() then
self:SetFramePosition('boss')
self:SetFramePosition('vehicleSeats')

Expand Down Expand Up @@ -316,7 +316,7 @@ function Position:SetMinimapPosition(point, x, y)

lastQuadrant = quadrant

if Chinchilla:IsClassic() then
if Chinchilla:IsClassic() or Chinchilla:IsBurningCrusade() then
QuestWatchFrame:GetSize()
else
ObjectiveTrackerFrame:GetSize()
Expand Down Expand Up @@ -508,7 +508,7 @@ function Position:UpdateClamp(info, value)
end
end

if Chinchilla:IsClassic() then
if Chinchilla:IsClassic() or Chinchilla:IsBurningCrusade() then
QuestWatchFrame:GetSize()
else
ObjectiveTrackerFrame:GetSize()
Expand Down
2 changes: 1 addition & 1 deletion Modules/QuestTracker.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

if Chinchilla:IsClassic() then return end
if Chinchilla:IsClassic() or Chinchilla:IsBurningCrusade() then return end

local QuestTracker = Chinchilla:NewModule("QuestTracker")
local L = LibStub("AceLocale-3.0"):GetLocale("Chinchilla")
Expand Down
15 changes: 13 additions & 2 deletions Modules/ShowHide.lua
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,17 @@ function ShowHide:OnInitialize()
zoomOut = "MinimapZoomOut",
clock = "TimeManagerClockButton",
}
elseif Chinchilla:IsBurningCrusade() then
frames = {
north = "MinimapNorthTag",
map = "MiniMapWorldMapButton",
mail = "MiniMapMailFrame",
dayNight = "GameTimeFrame",
track = "MiniMapTracking",
zoomIn = "MinimapZoomIn",
zoomOut = "MinimapZoomOut",
clock = "TimeManagerClockButton",
}
else
frames = {
boss = "Chinchilla_BossAnchor",
Expand Down Expand Up @@ -82,7 +93,7 @@ function ShowHide:OnInitialize()
end

function ShowHide:OnEnable()
if not Chinchilla:IsClassic() then
if Chinchilla:IsRetail() then
self:RegisterEvent("CALENDAR_ACTION_PENDING", "UpdateCalendar")
self:RegisterEvent("CALENDAR_UPDATE_PENDING_INVITES", "UpdateCalendar")
end
Expand Down Expand Up @@ -207,7 +218,7 @@ function ShowHide:GetOptions()
order = 1,
get = get, set = "UpdateMouseover",
},
calendarInviteOnly = not Chinchilla:IsClassic() and {
calendarInviteOnly = Chinchilla:IsRetail() and {
name = L["Unread Invites Only"],
desc = L["Only show the calendar when you have unread invites waiting for you."],
type = 'toggle',
Expand Down
2 changes: 1 addition & 1 deletion Modules/TrackingDots.lua
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ TrackingDots.desc = L["Change how the tracking dots look on the minimap."]
local blipFile = ""
local blizzardBlips = "Interface\\MiniMap\\ObjectIconsAtlas"
local trackingDotStyles = {}
local prefix = Chinchilla:IsClassic() and "Classic-" or "Blip-"
local prefix = Chinchilla:IsRetail() and "Blip-" or "Classic-"

function TrackingDots:AddTrackingDotStyle(english, localized, texture)
if type(english) ~= "string" then
Expand Down

0 comments on commit 3d5f3f7

Please sign in to comment.