Version 0.8.0-beta
- handle replacement via slash command - emote and ooc detection - de-/activate single mappings - move buttons and mappings are disabled when already at top/bottom or deactivated - minimap button is darkened when addon is disabled - help tab with examples - right-click on minimap button quickly de-/activates replacements - fixed mapping to raid warning, instance and battleground chats - localized raid target markers - capital % substitutions - incorrect consolidation - Umlaut and accent replacements
This commit is contained in:
@@ -2,10 +2,10 @@
|
||||
local _G = _G
|
||||
local Grichelde = _G.Grichelde
|
||||
|
||||
local pairs, find, toNumber = Grichelde.functions.pairs, Grichelde.functions.find, Grichelde.functions.toNumber
|
||||
local pairs, find, color, cOrange, toNumber = Grichelde.functions.pairs, Grichelde.functions.find, Grichelde.functions.color, Grichelde.functions.cOrange, Grichelde.functions.toNumber
|
||||
|
||||
function Grichelde:Upgrade_To_v060()
|
||||
self:PrefixedPrint(self.L.Upgrade_ToVersion, Grichelde.COLOR_CODES.ORANGE .. "0.6.0" .. Grichelde.COLOR_CODES.CLOSE)
|
||||
self:PrefixedPrint(self.L.Upgrade_ToVersion, cOrange("0.6.0"))
|
||||
|
||||
local replacements = self.db.profile.replacements or {}
|
||||
self:DebugPrint("Upgrade_To_v060 : old database")
|
||||
@@ -22,10 +22,10 @@ function Grichelde:Upgrade_To_v060()
|
||||
end
|
||||
|
||||
function Grichelde:Upgrade_To_v070()
|
||||
self:PrefixedPrint(self.L.Upgrade_ToVersion, Grichelde.COLOR_CODES.ORANGE .. "0.7.0" .. Grichelde.COLOR_CODES.CLOSE)
|
||||
self:PrefixedPrint(self.L.Upgrade_ToVersion, cOrange("0.7.0"))
|
||||
|
||||
local replacements = self.db.profile.replacements or {}
|
||||
self:DebugPrint("Upgrade_To_v070 : old database")
|
||||
self:DebugPrint("Upgrade_To_v070 : old replacements")
|
||||
self:DebugPrint(replacements)
|
||||
|
||||
for _, replTable in pairs(replacements) do
|
||||
@@ -33,13 +33,13 @@ function Grichelde:Upgrade_To_v070()
|
||||
replTable["ignoreCase"] = nil
|
||||
end
|
||||
|
||||
self:DebugPrint("Upgrade_To_v070 : new database")
|
||||
self:DebugPrint("Upgrade_To_v070 : new replacements")
|
||||
self:DebugPrint(replacements)
|
||||
return 0, 7, 0
|
||||
end
|
||||
|
||||
function Grichelde:Upgrade_To_v072()
|
||||
self:PrefixedPrint(self.L.Upgrade_ToVersion, Grichelde.COLOR_CODES.ORANGE .. "0.7.2" .. Grichelde.COLOR_CODES.CLOSE)
|
||||
self:PrefixedPrint(self.L.Upgrade_ToVersion, cOrange("0.7.2"))
|
||||
|
||||
self:DebugPrint("Upgrade_To_v072 : old database")
|
||||
self:DebugPrint(self.db.profile)
|
||||
@@ -51,6 +51,22 @@ function Grichelde:Upgrade_To_v072()
|
||||
return 0, 7, 2
|
||||
end
|
||||
|
||||
function Grichelde:Upgrade_To_v080()
|
||||
self:PrefixedPrint(self.L.Upgrade_ToVersion, cOrange("0.8.0"))
|
||||
|
||||
local replacements = self.db.profile.replacements or {}
|
||||
self:DebugPrint("Upgrade_To_v080 : old replacements")
|
||||
self:DebugPrint(replacements)
|
||||
|
||||
for _, replTable in pairs(replacements) do
|
||||
replTable["active"] = true
|
||||
end
|
||||
|
||||
self:DebugPrint("Upgrade_To_v080 : new replacements")
|
||||
self:DebugPrint(self.db.profile)
|
||||
return 0, 8, 0
|
||||
end
|
||||
|
||||
function Grichelde:UpgradeDatabase()
|
||||
local dbVersion = self.db.global.version or "0.0.0"
|
||||
self:DebugPrint("Database version:", dbVersion)
|
||||
@@ -76,6 +92,10 @@ function Grichelde:UpgradeDatabase()
|
||||
major, minor, patch = self:Upgrade_To_v072(dbVersion)
|
||||
end
|
||||
end
|
||||
if minor < 8 then
|
||||
upgrade = upgrade + 1
|
||||
major, minor, patch = self:Upgrade_To_v080(dbVersion)
|
||||
end
|
||||
end
|
||||
|
||||
if upgrade == 0 then
|
||||
@@ -83,7 +103,7 @@ function Grichelde:UpgradeDatabase()
|
||||
else
|
||||
if not error then
|
||||
self.db.global.version = self.version
|
||||
self:PrefixedPrint(Grichelde.COLOR_CODES.GREEN .. self.L.Upgrade_Successful .. Grichelde.COLOR_CODES.CLOSE)
|
||||
self:PrefixedPrint(color(Grichelde.COLOR_CODES.GREEN, self.L.Upgrade_Successful))
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user