Replace profile migrations with a fill-missing-defaults pass

Profiles are deep copies of DEFAULT_CONFIG, so settings added later never
reached existing saves; the versioned migration chain patched that by
hand. Fill every missing key from the defaults on load instead, skipping
the entries of the user-editable Triggers and Suppressions lists.

Drop CreationVersion and VERSION_NUMBER, take VERSION_STRING from the
.toc Version ("dev" for unpackaged checkouts), and retitle the window
to ClassicAPI Edition.
This commit is contained in:
Brues
2026-10-28 17:12:10 -05:00
parent 9bf7e51f76
commit c187c92106
2 changed files with 28 additions and 192 deletions
+8 -6
View File
@@ -6,15 +6,18 @@
-- Create "namespace."
MikSBT = {};
local addonName, addonTable = ...
-------------------------------------------------------------------------------
-- Mod Constants
-------------------------------------------------------------------------------
MikSBT.MOD_NAME = "MikScrollingBattleText"
MikSBT.VERSION_NUMBER = 4.43;
MikSBT.VERSION_STRING = "v4.43 beta";
MikSBT.WINDOW_TITLE = "Mik's Scrolling Battle Text " .. MikSBT.VERSION_STRING .. " - \124cffF58CBA\124hAthene Edit\124h\124r";
MikSBT.MOD_NAME = addonName
-- The packager fills in the .toc version ("v4.45"); an unpackaged checkout still has the
-- "@project-version@" placeholder.
local version = GetAddOnMetadata(addonName, "Version");
MikSBT.VERSION_STRING = string.find(version, "^@") and "dev" or version;
MikSBT.WINDOW_TITLE = "Mik's Scrolling Battle Text " .. MikSBT.VERSION_STRING .. " - \124cffF58CBA\124hClassicAPI Edition\124h\124r";
MikSBT.COMMAND = "/msbt";
@@ -206,7 +209,6 @@ MikSBT.DEFAULT_PROFILE_NAME = "Default";
-- %s = name of the spell, ability, buff, debuff, power type, etc.
-- %t = damage type
MikSBT.DEFAULT_CONFIG = {
CreationVersion = MikSBT.VERSION_NUMBER,
ShowPartialEffects = true,
ShowOverheals = true,
ShowGameDamage = false,