From 2e54f977c70b2e2847ecd6eefda2ea481ab71826 Mon Sep 17 00:00:00 2001 From: Kerrinen Hope <8914+Ravendwyr@users.noreply.github.com> Date: Fri, 11 Jun 2021 13:46:03 +0100 Subject: [PATCH] Update libraries. --- .pkgmeta | 1 + Chinchilla.lua | 22 +++------------------- Chinchilla.toc | 3 ++- Modules/Appearance.lua | 4 ++-- Modules/MoveButtons.lua | 2 +- Modules/Position.lua | 8 ++++---- Modules/QuestTracker.lua | 2 +- Modules/ShowHide.lua | 2 +- 8 files changed, 15 insertions(+), 29 deletions(-) diff --git a/.pkgmeta b/.pkgmeta index 8f10042..bef943d 100755 --- a/.pkgmeta +++ b/.pkgmeta @@ -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 diff --git a/Chinchilla.lua b/Chinchilla.lua index 790acc0..0a84e1a 100755 --- a/Chinchilla.lua +++ b/Chinchilla.lua @@ -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@ @@ -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 @@ -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 @@ -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 diff --git a/Chinchilla.toc b/Chinchilla.toc index add98e5..5d65def 100755 --- a/Chinchilla.toc +++ b/Chinchilla.toc @@ -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 @@ -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 diff --git a/Modules/Appearance.lua b/Modules/Appearance.lua index 4bad43b..0b09b5a 100755 --- a/Modules/Appearance.lua +++ b/Modules/Appearance.lua @@ -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) @@ -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() diff --git a/Modules/MoveButtons.lua b/Modules/MoveButtons.lua index 67c8ec0..86366d0 100755 --- a/Modules/MoveButtons.lua +++ b/Modules/MoveButtons.lua @@ -250,7 +250,7 @@ function MoveButtons:OnInitialize() zoomIn = MinimapZoomIn, zoomOut = MinimapZoomOut, } - elseif Chinchilla:IsBurningCrusade() then + elseif Chinchilla:IsBurningCrusadeClassic() then buttons = { map = MiniMapWorldMapButton, mail = MiniMapMailFrame, diff --git a/Modules/Position.lua b/Modules/Position.lua index fc352b4..04336fd 100755 --- a/Modules/Position.lua +++ b/Modules/Position.lua @@ -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, @@ -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") @@ -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() @@ -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() diff --git a/Modules/QuestTracker.lua b/Modules/QuestTracker.lua index 43cb020..f002663 100644 --- a/Modules/QuestTracker.lua +++ b/Modules/QuestTracker.lua @@ -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") diff --git a/Modules/ShowHide.lua b/Modules/ShowHide.lua index 2766a8f..3af366c 100755 --- a/Modules/ShowHide.lua +++ b/Modules/ShowHide.lua @@ -37,7 +37,7 @@ function ShowHide:OnInitialize() zoomOut = "MinimapZoomOut", clock = "TimeManagerClockButton", } - elseif Chinchilla:IsBurningCrusade() then + elseif Chinchilla:IsBurningCrusadeClassic() then frames = { north = "MinimapNorthTag", map = "MiniMapWorldMapButton",