js:锄地一条龙1.3.1 (#1478)

### 1.3.1(2025.08.05)
1.修复异步使用滚动造成的拾取失效
This commit is contained in:
mno
2025-08-05 10:03:43 +08:00
committed by GitHub
parent ee6090ac12
commit a462d23010
5 changed files with 12 additions and 9 deletions

View File

@@ -74,6 +74,8 @@
--- ---
### 更新日志 ### 更新日志
### 1.3.12025.08.05
1.修复异步使用滚动造成的拾取失效
### 1.3.02025.08.04 ### 1.3.02025.08.04
1.增加了识图频率限制,可以通过自定义配置中触发器间隔调节 1.增加了识图频率限制,可以通过自定义配置中触发器间隔调节
1.优化了拾取时的滚动效果 1.优化了拾取时的滚动效果

View File

@@ -3,19 +3,19 @@
{ {
"type": 6, "type": 6,
"mouseX": 0, "mouseX": 0,
"mouseY": 1200, "mouseY": 120,
"time": 0 "time": 0
}, },
{ {
"type": 6, "type": 6,
"mouseX": 0, "mouseX": 0,
"mouseY": 0, "mouseY": 0,
"time": 50 "time": 49
} }
], ],
"info": { "info": {
"name": "滚轮上翻", "name": "滚轮上翻",
"description": "模拟鼠标滚轮向上滚动1200单位", "description": "模拟鼠标滚轮向上滚动120单位",
"x": 0, "x": 0,
"y": 0, "y": 0,
"width": 1920, "width": 1920,

View File

@@ -10,12 +10,12 @@
"type": 6, "type": 6,
"mouseX": 0, "mouseX": 0,
"mouseY": 0, "mouseY": 0,
"time": 25 "time": 49
} }
], ],
"info": { "info": {
"name": "", "name": "",
"description": "", "description": "模拟鼠标滚轮向上滚动120单位",
"x": 0, "x": 0,
"y": 0, "y": 0,
"width": 1920, "width": 1920,

View File

@@ -638,9 +638,10 @@ async function runPath(pathFilePath, map_name, whitelistKeywords, blacklistKeywo
state.lastCheckMainUi = new Date(); state.lastCheckMainUi = new Date();
if (state.atMainUi) { if (state.atMainUi) {
//log.info("在主界面,尝试下滑"); //log.info("在主界面,尝试下滑");
keyMouseScript.runFile(`assets/滚轮下翻.json`); await keyMouseScript.runFile(`assets/滚轮下翻.json`);
} }
await sleep(trigger); await sleep(trigger);
lastMoveDown = new Date();
continue; continue;
} }
@@ -681,7 +682,7 @@ async function runPath(pathFilePath, map_name, whitelistKeywords, blacklistKeywo
// 如果距离上次下翻超过timeMoveUp秒则执行下翻 // 如果距离上次下翻超过timeMoveUp秒则执行下翻
if (currentTime - lastMoveDown > timeMoveUp) { if (currentTime - lastMoveDown > timeMoveUp) {
keyMouseScript.runFile(`assets/滚轮下翻.json`); await keyMouseScript.runFile(`assets/滚轮下翻.json`);
// 如果这是第一次下翻,记录这次下翻的时间 // 如果这是第一次下翻,记录这次下翻的时间
if (thisMoveUpTime === 0) { if (thisMoveUpTime === 0) {
@@ -695,7 +696,7 @@ async function runPath(pathFilePath, map_name, whitelistKeywords, blacklistKeywo
} }
} else { } else {
// 否则执行下翻 // 否则执行下翻
keyMouseScript.runFile(`assets/滚轮上翻.json`); await keyMouseScript.runFile(`assets/滚轮上翻.json`);
} }
} }

View File

@@ -1,7 +1,7 @@
{ {
"manifest_version": 1, "manifest_version": 1,
"name": "锄地一条龙", "name": "锄地一条龙",
"version": "1.3.0", "version": "1.3.1",
"description": "一站式解决自动化锄地支持只拾取狗粮请仔细阅读README.md后使用", "description": "一站式解决自动化锄地支持只拾取狗粮请仔细阅读README.md后使用",
"authors": [ "authors": [
{ {