From 33155ef2ed5ad7aa4803af0836c3942d043eea1f Mon Sep 17 00:00:00 2001 From: HenryDu8133 <813367384@qq.com> Date: Fri, 10 Jul 2026 21:35:18 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E6=9B=B4=E6=96=B0=E9=80=BB=E8=BE=91):=20?= =?UTF-8?q?=E8=B0=83=E6=95=B4=E6=9B=B4=E6=96=B0=E8=A7=A6=E5=8F=91=E9=80=BB?= =?UTF-8?q?=E8=BE=91=EF=BC=8C=E6=96=B0=E5=A2=9Eforce=5Fupdate=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E6=8E=A7=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 同步修改ticketmachine.lua和gate.lua,新增配置项判断逻辑替代原有的自动更新标记代码 --- gate.lua | 10 ++++------ ticketmachine.lua | 4 ++++ 2 files changed, 8 insertions(+), 6 deletions(-) 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