From 591045a606a4797ae78d0fef40a7d560b2c57d74 Mon Sep 17 00:00:00 2001 From: Brues <5278969+brues-code@users.noreply.github.com> Date: Sat, 27 Jun 2026 16:46:56 -0500 Subject: [PATCH] config: stamp sentinel version on dev builds to stop migration re-fire MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Dev / git-cloned installs carry "@project-version@" in the toc, which pfUI normalizes to pfUI.version.string = "dev". MigrateConfig was writing that literal back into pfUI_config.version; on the next /reload checkversion() parsed "dev" through tonumber() → nil → 0, evaluated curversion as 0/0/0, and re-fired every version-gated migration block. The >3.6.1 buff migration unconditionally rewrites buffs.{buffs,debuffs, weapons} from the legacy global.hide{,w}buff knobs, so user toggles for those checkboxes were getting wiped on every reload. Stamp "999.999.999" on dev builds so subsequent comparisons turn false. Affected users will need to re-toggle the buffs/debuffs/weapon-buffs checkboxes once after this update. Refs #7. --- api/config.lua | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/api/config.lua b/api/config.lua index b926a6f6..a158de86 100644 --- a/api/config.lua +++ b/api/config.lua @@ -1387,5 +1387,17 @@ function pfUI:MigrateConfig() end end - pfUI_config.version = pfUI.version.string + -- Stamp the version we've migrated to. Dev / git-cloned builds carry + -- "@project-version@" in the toc, which pfUI.lua normalizes to "dev" — + -- writing that here would have checkversion() parse it back as 0/0/0 on + -- the next /reload and re-fire every migration block, clobbering user + -- toggles (notably the >3.6.1 buff migration that rewrites + -- buffs.{buffs,debuffs,weapons} from the deprecated global.hide{,w}buff + -- knobs). Stamp a far-future sentinel instead so checkversion() can't + -- flip true again on subsequent loads. + if pfUI.version.string == "dev" then + pfUI_config.version = "999.999.999" + else + pfUI_config.version = pfUI.version.string + end end \ No newline at end of file