From 84ae468a23727cf4e967879c14ca5a9d7c495f67 Mon Sep 17 00:00:00 2001 From: yan Date: Sun, 18 Jan 2026 16:48:27 +0800 Subject: [PATCH] =?UTF-8?q?feat(FullyAutoAndSemiAutoTools):=20=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E8=B0=83=E8=AF=95=E6=97=A5=E5=BF=97=E5=8A=9F=E8=83=BD?= =?UTF-8?q?=E5=B9=B6=E4=BC=98=E5=8C=96=E9=98=9F=E4=BC=8D=E5=88=87=E6=8D=A2?= =?UTF-8?q?=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 添加了needRunMap的调试日志输出功能 - 修改switchTeamByIndex函数增加key参数支持 - 在路线切换时传入对应的元素名称作为标识 - 为草神路线切换添加了明确的调用参数 --- repo/js/FullyAutoAndSemiAutoTools/main.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/repo/js/FullyAutoAndSemiAutoTools/main.js b/repo/js/FullyAutoAndSemiAutoTools/main.js index 41905a802..6fcf66011 100644 --- a/repo/js/FullyAutoAndSemiAutoTools/main.js +++ b/repo/js/FullyAutoAndSemiAutoTools/main.js @@ -639,7 +639,10 @@ async function initRun(config_run) { }); }) - + await debugKey( + 'log-needRunMap.json', + JSON.stringify([...needRunMap]) + ); // needRunMap.set(as_name, { // paths: matchedPaths, // as_name: as_name, @@ -1389,7 +1392,7 @@ async function runPath(path) { * @param {number} index - 要切换的队伍在SevenElements数组中的索引 * @returns {Promise} */ - async function switchTeamByIndex(index) { + async function switchTeamByIndex(index,key) { // 获取指定索引的队伍名称,如果索引超出范围或小于0则返回undefined const teamName = team.SevenElements.length > index && index >= 0 ? team.SevenElements[index] : undefined; // 检查队伍名称是否有效 @@ -1426,7 +1429,7 @@ async function runPath(path) { } else if(path.includes("有草神")){ const idx = SevenElement.SevenElements.indexOf('草'); - await switchTeamByIndex(idx); + await switchTeamByIndex(idx,"路线需要草神"); } else { const entry = [...SevenElement.SevenElementsMap.entries()].find(([key, val]) => { @@ -1435,7 +1438,7 @@ async function runPath(path) { if (entry) { const [key, val] = entry; const index = SevenElement.SevenElements.indexOf(key); - await switchTeamByIndex(index); + await switchTeamByIndex(index,key); // const teamName = team.SevenElements.length > index && index >= 0 ? // team.SevenElements[index] : undefined; //