diff --git a/gate.lua b/gate.lua index 7cfd493..ac8b5a7 100644 --- a/gate.lua +++ b/gate.lua @@ -1406,12 +1406,10 @@ while true do pcall(function() refreshRemoteLuaVersion(guessBaseFromStatusURL(serverURL)) end) - -- 取消自动标记更新,仅由外部事件(例如手动控制台)触发时处理 - -- if versionMismatch == true then - -- pendingGateUpdate = true - -- elseif versionMismatch == false then - -- pendingGateUpdate = false - -- end + if type(cfg.force_update) == "boolean" and cfg.force_update == true and versionMismatch == true then + pendingGateUpdate = true + end + if pendingGateUpdate and isGateIdleForUpdate() then isUpdating = true drawReadyScreen() diff --git a/ticketmachine.lua b/ticketmachine.lua index 49db9d0..ce9281f 100644 --- a/ticketmachine.lua +++ b/ticketmachine.lua @@ -680,6 +680,10 @@ local function backgroundSyncTask() end sleep(UPDATE_CHECK_INTERVAL) pcall(refreshConfigOnce) + + if type(CFG.force_update) == 'boolean' and CFG.force_update == true and versionMismatch == true then + pendingMachineUpdate = true + end end end