From 572c84a5b93b1db3c30b0806d4927cd0d0baaea1 Mon Sep 17 00:00:00 2001 From: mno <718135749@qq.com> Date: Thu, 18 Dec 2025 15:55:03 +0800 Subject: [PATCH] =?UTF-8?q?js=EF=BC=9A=E7=8B=97=E7=B2=AE=E5=9B=A2=E8=B4=AD?= =?UTF-8?q?1.10.2=20(#2521)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 更新强迫症模式 --- repo/js/ArtifactsGroupPurchasing/main.js | 19 ++++++++++++++----- .../js/ArtifactsGroupPurchasing/manifest.json | 2 +- .../js/ArtifactsGroupPurchasing/settings.json | 2 +- 3 files changed, 16 insertions(+), 7 deletions(-) diff --git a/repo/js/ArtifactsGroupPurchasing/main.js b/repo/js/ArtifactsGroupPurchasing/main.js index c193d1b65..eb9076e3d 100644 --- a/repo/js/ArtifactsGroupPurchasing/main.js +++ b/repo/js/ArtifactsGroupPurchasing/main.js @@ -142,9 +142,18 @@ let skipRunning = false; if (skipRunning) { log.info(`本次运行启用并触发了强迫症模式,需要重新上线`); - log.debug('ABGI启动联机上线:'); - await sleep(2000); - log.debug('ABGI启动配置组:强迫症等待组'); + + // 按中文分号分割字符串 + const segments = settings.onlyRunPerfectly.split(';'); + + // 逐段输出,每段间隔1秒 + for (const segment of segments) { + if (segment.trim()) { // 跳过空段落 + log.info(segment.trim()); + await sleep(1000); + } + } + return; } @@ -338,7 +347,7 @@ async function runGroupPurchasing(runExtra) { } log.warn("等待队友就绪超时"); - if (settings.onlyRunPerfectly === "确认启用强迫症模式") { + if (settings.onlyRunPerfectly) { skipRunning = true; doRunExtra = false; } @@ -770,7 +779,7 @@ async function autoEnter(autoEnterSettings) { if (new Date() - start >= timeout * 60 * 1000) { log.warn("超时未达到预定人数"); notification.error(`超时未达到预定人数`); - if (settings.onlyRunPerfectly === "确认启用强迫症模式") { + if (settings.onlyRunPerfectly) { skipRunning = true; doRunExtra = false; } diff --git a/repo/js/ArtifactsGroupPurchasing/manifest.json b/repo/js/ArtifactsGroupPurchasing/manifest.json index f42d8efdd..3851fb875 100644 --- a/repo/js/ArtifactsGroupPurchasing/manifest.json +++ b/repo/js/ArtifactsGroupPurchasing/manifest.json @@ -1,7 +1,7 @@ { "manifest_version": 1, "name": "AAA狗粮联机团购", - "version": "1.10.1", + "version": "1.10.2", "tags": [ "狗粮" ], diff --git a/repo/js/ArtifactsGroupPurchasing/settings.json b/repo/js/ArtifactsGroupPurchasing/settings.json index 003d4c89f..6ca4358b9 100644 --- a/repo/js/ArtifactsGroupPurchasing/settings.json +++ b/repo/js/ArtifactsGroupPurchasing/settings.json @@ -17,7 +17,7 @@ { "name": "onlyRunPerfectly", "type": "input-text", - "label": "输入:\n确认启用强迫症模式\n以启用\n人不齐或队友未正常到位时不执行任何路线" + "label": "输入任意内容后启用强迫症模式\n人不齐或队友未正常到位时不执行任何路线\n并在运行结束后输出按中文分号;分隔的内容" }, { "name": "groupMode",