Skip to content

Commit

Permalink
Update libraries.
Browse files Browse the repository at this point in the history
  • Loading branch information
Ravendwyr committed Jun 11, 2021
1 parent 3147830 commit 2e54f97
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 29 deletions.
1 change: 1 addition & 0 deletions .pkgmeta
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ externals:
Libs/AceTimer-3.0: https://repos.wowace.com/wow/ace3/trunk/AceTimer-3.0
Libs/LibSharedMedia-3.0: https://repos.wowace.com/wow/libsharedmedia-3-0/trunk/LibSharedMedia-3.0
Libs/AceGUI-3.0-SharedMediaWidgets: https://repos.wowace.com/wow/ace-gui-3-0-shared-media-widgets/trunk/AceGUI-3.0-SharedMediaWidgets
Libs/LibIsClassic-1.0: https://repos.wowace.com/wow/libisclassic

ignore:
- _config.yml
Expand Down
22 changes: 3 additions & 19 deletions Chinchilla.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
local AceConfigDialog = LibStub("AceConfigDialog-3.0")
local L = LibStub("AceLocale-3.0"):GetLocale("Chinchilla")

Chinchilla = LibStub("AceAddon-3.0"):NewAddon("Chinchilla", "AceConsole-3.0", "AceHook-3.0")
Chinchilla = LibStub("AceAddon-3.0"):NewAddon("Chinchilla", "AceConsole-3.0", "AceHook-3.0", "LibIsClassic-1.0")


--[===[@non-debug@
Expand Down Expand Up @@ -46,22 +46,6 @@ function Chinchilla:Minimap_OnMouseUp(this, button, ...)
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 @@ -221,7 +205,7 @@ function Chinchilla:OnEnable()
MinimapBorderTop:Hide()
MinimapZoneTextButton:Hide()

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

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

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

Expand Down
3 changes: 2 additions & 1 deletion Chinchilla.toc
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
## X-WoWI-ID: 8394
## X-Wago-ID: XrNkjlGa
## SavedVariables: Chinchilla2DB
## OptionalDeps: LibStub, CallbackHandler-1.0, Ace3, LibSharedMedia-3.0, AceGUI-3.0-SharedMediaWidgets, Blizzard_TimeManager
## OptionalDeps: LibStub, CallbackHandler-1.0, Ace3, LibIsClassic-1.0, LibSharedMedia-3.0, AceGUI-3.0-SharedMediaWidgets, Blizzard_TimeManager

#@no-lib-strip@
Libs\LibStub\LibStub.lua
Expand All @@ -37,6 +37,7 @@ Libs\AceHook-3.0\AceHook-3.0.lua
Libs\AceTimer-3.0\AceTimer-3.0.lua
Libs\LibSharedMedia-3.0\LibSharedMedia-3.0.lua
Libs\AceGUI-3.0-SharedMediaWidgets\widget.xml
Libs\LibIsClassic-1.0\LibIsClassic-1.0.lua
#@end-no-lib-strip@

Locale\enUS.lua
Expand Down
4 changes: 2 additions & 2 deletions Modules/Appearance.lua
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ function Appearance:OnDisable()
MinimapBorder:Show()
Minimap:SetAlpha(1)

if Chinchilla:IsClassic() or Chinchilla:IsBurningCrusade() then
if Chinchilla:IsClassic() or Chinchilla:IsBurningCrusadeClassic() then
Minimap:SetMaskTexture("Textures\\MinimapMask")
else
Minimap:SetMaskTexture(186178)
Expand Down Expand Up @@ -239,7 +239,7 @@ function Appearance:SetScale(value)

Minimap:SetScale(value)

if Chinchilla:IsClassic() or Chinchilla:IsBurningCrusade() then
if Chinchilla:IsClassic() or Chinchilla:IsBurningCrusadeClassic() then
QuestWatchFrame:GetSize()
else
ObjectiveTrackerFrame:GetSize()
Expand Down
2 changes: 1 addition & 1 deletion Modules/MoveButtons.lua
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ function MoveButtons:OnInitialize()
zoomIn = MinimapZoomIn,
zoomOut = MinimapZoomOut,
}
elseif Chinchilla:IsBurningCrusade() then
elseif Chinchilla:IsBurningCrusadeClassic() then
buttons = {
map = MiniMapWorldMapButton,
mail = MiniMapMailFrame,
Expand Down
8 changes: 4 additions & 4 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() or Chinchilla:IsBurningCrusade() then
if Chinchilla:IsClassic() or Chinchilla:IsBurningCrusadeClassic() then
nameToFrame = {
minimap = Minimap,
durability = DurabilityFrame,
Expand Down Expand Up @@ -173,7 +173,7 @@ function Position:OnEnable()
self:SecureHook(DurabilityFrame, "SetPoint", "DurabilityFrame_SetPoint")
self:SecureHook(TicketStatusFrame, "SetPoint", "TicketStatusFrame_SetPoint")

if Chinchilla:IsClassic() or Chinchilla:IsBurningCrusade() then
if Chinchilla:IsClassic() or Chinchilla:IsBurningCrusadeClassic() then
self:SecureHook(QuestWatchFrame, "SetPoint", "WatchFrame_SetPoint")
else
self:SecureHook(VehicleSeatIndicator, "SetPoint", "VehicleSeatIndicator_SetPoint")
Expand Down Expand Up @@ -316,7 +316,7 @@ function Position:SetMinimapPosition(point, x, y)

lastQuadrant = quadrant

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

if Chinchilla:IsClassic() or Chinchilla:IsBurningCrusade() then
if Chinchilla:IsClassic() or Chinchilla:IsBurningCrusadeClassic() 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() or Chinchilla:IsBurningCrusade() then return end
if Chinchilla:IsClassic() or Chinchilla:IsBurningCrusadeClassic() then return end

local QuestTracker = Chinchilla:NewModule("QuestTracker")
local L = LibStub("AceLocale-3.0"):GetLocale("Chinchilla")
Expand Down
2 changes: 1 addition & 1 deletion Modules/ShowHide.lua
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ function ShowHide:OnInitialize()
zoomOut = "MinimapZoomOut",
clock = "TimeManagerClockButton",
}
elseif Chinchilla:IsBurningCrusade() then
elseif Chinchilla:IsBurningCrusadeClassic() then
frames = {
north = "MinimapNorthTag",
map = "MiniMapWorldMapButton",
Expand Down

0 comments on commit 2e54f97

Please sign in to comment.