From 89ed5bdb1f87a68c7d290e2c253dc5beab99d4b1 Mon Sep 17 00:00:00 2001 From: yan Date: Sun, 18 Jan 2026 12:35:30 +0800 Subject: [PATCH] =?UTF-8?q?Revert=20"refactor(FullyAutoAndSemiAutoTools):?= =?UTF-8?q?=20=E6=9B=B4=E6=96=B0runPath=E5=87=BD=E6=95=B0=E5=8F=82?= =?UTF-8?q?=E6=95=B0=E5=92=8C=E6=88=98=E6=96=97=E9=9C=80=E6=B1=82=E6=A3=80?= =?UTF-8?q?=E6=9F=A5=E9=80=BB=E8=BE=91"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 7995c67419a2fade578a513a958804719ed2b47d. --- repo/js/FullyAutoAndSemiAutoTools/main.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/repo/js/FullyAutoAndSemiAutoTools/main.js b/repo/js/FullyAutoAndSemiAutoTools/main.js index d1f3ff3f7..064358e53 100644 --- a/repo/js/FullyAutoAndSemiAutoTools/main.js +++ b/repo/js/FullyAutoAndSemiAutoTools/main.js @@ -1356,7 +1356,7 @@ async function keyMousePressStart(key) { * 执行指定路径的脚本文件 * @param {string} path - 要执行的脚本路径 */ -async function runPath(path, current_name="", parent_name="") { +async function runPath(path) { // 参数验证 if (!path || typeof path !== 'string') { log.warn('无效的路径参数: {path}', path) @@ -1369,7 +1369,7 @@ async function runPath(path, current_name="", parent_name="") { return } //检查战斗需求 -/* try { + try { if (!team.fight) { const one = JSON.parse(file.readTextSync(path)) if (one.info?.description?.includes("请配置好战斗策略")) { @@ -1381,7 +1381,7 @@ async function runPath(path, current_name="", parent_name="") { } } catch (error) { log.error("检查战斗需求失败: {error}", error.message); - }*/ + } //切换队伍 if (team.fight) { if (!team.fightName) { @@ -1488,7 +1488,7 @@ async function runList(list = [], key = "") { } try { // 执行单个路径,并传入停止标识 - await runPath(path, onePath.current_name,onePath.parent_name); + await runPath(path); } catch (error) { log.error('执行路径列表中的路径失败: {path}, 错误: {error}', path, error.message); continue; // 继续执行列表中的下一个路径