Skip to content

Commit 78b5a5b

Browse files
committed
Added deprecation warning to all versions of the game.
1 parent 7f04e70 commit 78b5a5b

File tree

7 files changed

+56
-0
lines changed

7 files changed

+56
-0
lines changed

AdiBags.toc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ modules\Masque.lua
8686

8787
core\ItemDatabase.lua
8888
core\DefaultFilters.lua
89+
core\Deprecation.lua
8990

9091
#@debug@
9192
## Version: DEV

AdiBags_TBC.toc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ modules\Masque.lua
7878

7979
core\ItemDatabase.lua
8080
core\DefaultFilters.lua
81+
core\Deprecation.lua
8182

8283
#@debug@
8384
## Version: DEV

AdiBags_Vanilla.toc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ modules\Masque.lua
8282

8383
core\ItemDatabase.lua
8484
core\DefaultFilters.lua
85+
core\Deprecation.lua
8586

8687
#@debug@
8788
## Version: DEV

AdiBags_Wrath.toc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ modules\Masque.lua
8282

8383
core\ItemDatabase.lua
8484
core\DefaultFilters.lua
85+
core\Deprecation.lua
8586

8687
#@debug@
8788
## Version: DEV

core/Constants.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,7 @@ addon.DEFAULT_SETTINGS = {
194194
bags = {
195195
["*"] = true,
196196
},
197+
deprecationPhase = 1,
197198
positionMode = "manual",
198199
positions = {
199200
anchor = { point = "BOTTOMRIGHT", xOffset = -32, yOffset = 200 },

core/Core.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ function addon:OnInitialize()
111111
C_CVar.SetCVar("professionAccessorySlotsExampleShown", 1)
112112
end
113113

114+
self:Deprecation()
114115
self:Debug('Initialized')
115116
end
116117

core/Deprecation.lua

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
local addonName = ...
2+
---@class AdiBags: ABEvent-1.0
3+
local addon = LibStub('AceAddon-3.0'):GetAddon(addonName)
4+
5+
-- This is a deprecation message for AdiBags. To remove this for whatever reason,
6+
-- remove this call from Core.lua in OnInitialize.
7+
function addon:Deprecation()
8+
if addon.db.profile.deprecationPhase < 2 then
9+
print("AdiBags is deprecated and will get no new feature releases.")
10+
print("Please consider switching to AdiBags' successor, BetterBags.")
11+
print("BetterBags is available at Curse, Wago, and github.com/Cidan/BetterBags")
12+
local frame = CreateFrame("Frame", nil, UIParent, "BackdropTemplate")
13+
frame:SetBackdrop({
14+
bgFile = "Interface/Tooltips/UI-Tooltip-Background",
15+
edgeFile = "Interface/Tooltips/UI-Tooltip-Border",
16+
tile = true,
17+
tileSize = 16,
18+
edgeSize = 16,
19+
insets = { left = 4, right = 0, top = 4, bottom = 4 }
20+
})
21+
frame:SetBackdropColor(0, 0, 0, 0.9)
22+
frame:SetPoint("LEFT", 30, 0)
23+
frame:SetSize(440, 300)
24+
local text = frame:CreateFontString(nil, "OVERLAY", "GameFontNormalLarge")
25+
text:SetTextColor(1, 1, 1, 1)
26+
text:SetPoint("LEFT", 20, 0)
27+
text:SetJustifyH("LEFT")
28+
text:SetText([[
29+
AdiBags is deprecated, will get no new feature releases, and may or may not get bug fixes over time.
30+
Please consider switching to AdiBags' successor, BetterBags.
31+
BetterBags is written by the same team that maintains AdiBags.
32+
BetterBags is available at Curse, Wago, and github.com/Cidan/BetterBags
33+
This message will not be shown again, but you can continue to use AdiBags so long as it works.
34+
Thanks! :)
35+
]])
36+
text:SetWordWrap(true)
37+
text:SetWidth(400)
38+
--frame:SetSize(text:GetStringWidth()+ 40, 200)
39+
40+
local button = CreateFrame("Button", nil, frame, "UIPanelButtonTemplate")
41+
button:SetSize(180, 25)
42+
button:SetPoint("BOTTOM", 0, 10)
43+
button:SetText("Do Not Show Again")
44+
button:SetScript("OnClick", function()
45+
addon.db.profile.deprecationPhase = 2
46+
frame:Hide()
47+
end)
48+
frame:Show()
49+
end
50+
end

0 commit comments

Comments
 (0)