From 28c4519777d9dffdb45cecae31bfc2af3fed0f2f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B7=E4=B8=AA=E5=90=8D=E5=AD=97=E5=A5=BD=E9=9A=BE?= =?UTF-8?q?=E7=9A=84=E5=96=B5?= <25520958+MisakaAldrich@users.noreply.github.com> Date: Wed, 9 Apr 2025 23:29:46 +0800 Subject: [PATCH] =?UTF-8?q?JS=E8=84=9A=E6=9C=AC=EF=BC=9A=E5=88=87=E6=8D=A2?= =?UTF-8?q?=E9=98=9F=E4=BC=8D=E5=8A=A0=E9=80=9F=E7=89=88feat:=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E5=88=87=E6=8D=A2=E6=88=90=E5=8A=9F/=E5=A4=B1?= =?UTF-8?q?=E8=B4=A5=E9=80=9A=E7=9F=A5=20(#548)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- repo/js/AcceleratedEditionSwitchParty/main.js | 8 ++++++-- repo/js/AcceleratedEditionSwitchParty/manifest.json | 4 ++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/repo/js/AcceleratedEditionSwitchParty/main.js b/repo/js/AcceleratedEditionSwitchParty/main.js index f9dcc98f..f62be8de 100644 --- a/repo/js/AcceleratedEditionSwitchParty/main.js +++ b/repo/js/AcceleratedEditionSwitchParty/main.js @@ -64,6 +64,7 @@ const RightSliderBottomRo = RecognitionObject.TemplateMatch(file.ReadImageMatSyn log.info("当前队伍名称位置:({x},{y},{w},{h}), 识别结果:{text}", res.x, res.y, res.Width, res.Height, res.text); if (res.text.includes(partyName)) { log.info("当前队伍即为目标队伍,无需切换"); + notification.send(`当前队伍即为目标队伍:${partyName},无需切换`); keyPress("VK_ESCAPE"); await sleep(500); } else { @@ -100,6 +101,7 @@ const RightSliderBottomRo = RecognitionObject.TemplateMatch(file.ReadImageMatSyn if (DeployButton.isExist()) { log.info("识别到部署按钮:({x},{y},{w},{h})", DeployButton.x, DeployButton.y, DeployButton.Width, DeployButton.Height); DeployButton.click(); + notification.send(`寻找到目标队伍:${partyName},点击部署`); ConfigureStatue = true; break; } @@ -113,7 +115,8 @@ const RightSliderBottomRo = RecognitionObject.TemplateMatch(file.ReadImageMatSyn } } if (!ConfigureStatue) { - log.warn("\n\n队伍切换失败,可能是:\n1.处于联机模式 \n2.无法正确识别\n3.JS自定义配置中的队伍名称设置错误,请检查!\n"); + log.error("\n\n队伍切换失败,可能是:\n1.处于联机模式 \n2.无法正确识别\n3.JS自定义配置中的队伍名称设置错误,请检查!\n"); + notification.error("队伍切换失败,可能是:\n1.处于联机模式 \n2.无法正确识别\n3.JS自定义配置中的队伍名称设置错误,请检查!"); await genshin.returnMainUi(); break; } @@ -140,7 +143,8 @@ const RightSliderBottomRo = RecognitionObject.TemplateMatch(file.ReadImageMatSyn // await genshin.returnMainUi(); // } } else { - log.warn("没有设置切换队伍"); + log.error("没有设置切换队伍"); + notification.error("没有设置切换队伍"); await genshin.returnMainUi(); } })(); \ No newline at end of file diff --git a/repo/js/AcceleratedEditionSwitchParty/manifest.json b/repo/js/AcceleratedEditionSwitchParty/manifest.json index 62b73da1..5e8b0e70 100644 --- a/repo/js/AcceleratedEditionSwitchParty/manifest.json +++ b/repo/js/AcceleratedEditionSwitchParty/manifest.json @@ -1,8 +1,8 @@ { "manifest_version": 1, "name": "返回七天神像切换指定队伍加速版", - "version": "1.0", - "BgiVersion": "0.44.1", + "version": "1.1", + "BgiVersion": "0.44.4", "description": "", "authors": [ {