From b0dfd1308b198abcc0af88694fab32dac0e0a9de Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 13 Oct 2026 09:31:35 -0400 Subject: [PATCH] Fix: run the 1.3.4 trip-length repair after the saved data is loaded Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01WyQKCL92ZLwPi9qmYQtNdc --- CHANGELOG.md | 1 + OctoBus.lua | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index edf1d50..34e3af4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ - The footer no longer names the route with the oldest data (the restart correction makes it unnecessary). It only appears after a server restart, while a route in the window has not been seen since. ### Fixed +- The 1.3.4 one-time repair of saved trip lengths never actually ran (it ran before the game loaded the saved data), so copies used before 1.3.4 kept wrong trip lengths and drifted by up to a minute, e.g. Grom'gol about 45 seconds slow after 11 hours. - The settings window needed two right-clicks to open, and some checkboxes on a shared line (outline, sound) toggled their neighbour. - Window size, look, lock, position and the minimap icon's spot were not restored after logging in: they were applied before the game had loaded the saved settings. diff --git a/OctoBus.lua b/OctoBus.lua index cdac694..94bc17e 100644 --- a/OctoBus.lua +++ b/OctoBus.lua @@ -184,7 +184,10 @@ local OB_OK, OB_ERR = pcall(function () -- One-time repair (1.3.4): restarts used to re-measure trip lengths from only a few -- trips, throwing away days of evidence. Restore the long-term values (built in now), -- count them as 700 trips of evidence, and recompute the restart offsets with them. - if not DB.fix134 then + -- Runs once the saved data is loaded (VARIABLES_LOADED below): this file runs before + -- that, so a repair here alone would only touch a temporary empty table. + local function Repair134() + if DB.fix134 then return end for i = 1, table.getn(ROUTES) do local r = ROUTES[i] local e = r.entry @@ -1812,6 +1815,7 @@ local OB_OK, OB_ERR = pcall(function () local f = CreateFrame("Frame") f:RegisterEvent("VARIABLES_LOADED") f:SetScript("OnEvent", function() + Repair134() panel:SetScale(CFG.scale or 1) ApplyLook() if CFG.locked then grip:Hide() else grip:Show() end