From b5cee3e2db3ff4a825f3c0ab31efe13e449290bf Mon Sep 17 00:00:00 2001 From: myHuTao-qwq <111904986+myHuTao-qwq@users.noreply.github.com> Date: Fri, 24 Oct 2025 11:20:17 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20ParametricTrans/=E8=87=AA=E5=8A=A8?= =?UTF-8?q?=E5=8F=82=E9=87=8F=E8=B4=A8=E5=8F=98=E4=BB=AAjs=20info=E4=B8=8E?= =?UTF-8?q?=E5=8F=98=E9=87=8F=E5=90=8D=E6=9B=B4=E6=96=B0=20(#2224)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix typo: 自动参量质变仪现在可以不放薄荷了, 把提示中"薄荷"改为"材料" * 把注释和变量里面的薄荷/BH修复成了材料/MATERIAL --- repo/js/ParametricTrans/main.js | 14 +++++++------- repo/js/ParametricTrans/settings.json | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/repo/js/ParametricTrans/main.js b/repo/js/ParametricTrans/main.js index 131f1ae32..5d84eeb25 100644 --- a/repo/js/ParametricTrans/main.js +++ b/repo/js/ParametricTrans/main.js @@ -1,7 +1,7 @@ (async function () { //初始化配置====================================================================================== - var BH = typeof settings.BH === 'string' && settings.BH.trim() !== '' ? settings.BH : "assets/bh.png"; + var MATERIAL = typeof settings.MATERIAL === 'string' && settings.MATERIAL.trim() !== '' ? settings.MATERIAL : "assets/bh.png"; var ZHIBIANYI = typeof settings.ZHIBIANY === 'string' && settings.ZHIBIANYI.trim() !== '' ? settings.ZHIBIANYI : "assets/zhibian.png"; var actiontime = settings.actiontime != undefined && ~~settings.actiontime > 0 ? ~~settings.actiontime : 50; var CHA = "assets/cha.png" @@ -126,7 +126,7 @@ async function deployTransformer(){ /**====================================================================================== - * 游戏内“参量质变仪”的放入薄荷交互流程 + * 游戏内“参量质变仪”的放入材料交互流程 */ async function insertMaterial(){ @@ -165,12 +165,12 @@ async function insertMaterial(){ await leftButtonDown(); await sleep(100); await moveMouseTo(1287,161); - // 薄荷图片检测 + // 质变材料图片检测 let YOffset = 0; // Y轴偏移量,根据需要调整 const maxRetries = 20; // 最大重试次数 let retries = 0; // 当前重试次数 while (retries < maxRetries) { - await imageRecognition(BH, 1, 0, 0); + await imageRecognition(MATERIAL, 1, 0, 0); if (result.found) { await leftButtonUp(); await sleep(500); @@ -245,12 +245,12 @@ async function executeAttack(){ //开始执行质变仪流程============================================ try { if ((await deployTransformer())) {//部署质变仪流程 - log.info("部署成功,准备放入薄荷!!"); + log.info("部署成功,准备放入材料(默认薄荷)!!"); } - if ((!await insertMaterial())) {//放入薄荷并开始质变流程 + if ((!await insertMaterial())) {//放入材料并开始质变流程 log.info("未找到布置的质变仪,可能已经放入材料,尝试进行攻击流程!!"); }else{ - log.info("放入薄荷完成,开始质变!!"); + log.info("放入材料完成,开始质变!!"); } if ((await executeAttack())) {//芭芭拉攻击指令流程 log.info("质变执行完成,结束!!"); diff --git a/repo/js/ParametricTrans/settings.json b/repo/js/ParametricTrans/settings.json index 65fb2c0e4..244379f8a 100644 --- a/repo/js/ParametricTrans/settings.json +++ b/repo/js/ParametricTrans/settings.json @@ -5,7 +5,7 @@ "label": "必填!!队伍名称,4号位放芭芭拉!" }, { - "name": "BH", + "name": "MATERIAL", "type": "input-text", "label": "选填,默认薄荷,识别物料的图片路径(默认assets/bh.png)", "default": "assets/bh.png"