From cf18d29a759172e52e6ab598b76b8e534688764d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B1=9F=E7=B4=AB=E7=83=9Fowo?= <232029620+jiangziyanowo@users.noreply.github.com> Date: Fri, 24 Oct 2025 17:15:16 +0800 Subject: [PATCH] =?UTF-8?q?AutoMonday-V1.3.2=E7=89=88=E6=9C=AC=E6=9B=B4?= =?UTF-8?q?=E6=96=B0=20(#2233)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1. 修改了账户名的获取逻辑:删除了原有的ocr获取uid,改为手动输入的方式(历史记录会受到影响,但避免了后续出现bug的可能性) --- repo/js/AutoMonday/README.md | 2 ++ repo/js/AutoMonday/main.js | 17 +---------------- repo/js/AutoMonday/manifest.json | 2 +- repo/js/AutoMonday/settings.json | 5 +++++ 4 files changed, 9 insertions(+), 17 deletions(-) diff --git a/repo/js/AutoMonday/README.md b/repo/js/AutoMonday/README.md index a7a527da2..d56cd91c0 100644 --- a/repo/js/AutoMonday/README.md +++ b/repo/js/AutoMonday/README.md @@ -41,6 +41,8 @@ --------------------------------------------------------------------------------------------------------------------------------- ## 更新日志 +### 1.3.2(2025.10.24) +1. 修改了账户名的获取逻辑:删除了原有的ocr获取uid,改为手动输入的方式(历史记录会受到影响,但避免了后续出现bug的可能性) ### 1.3.1(2025.10.09) 1. 完善了法器角色充能模式的相关逻辑 2. 修复了部分描述不符的地方 diff --git a/repo/js/AutoMonday/main.js b/repo/js/AutoMonday/main.js index 1bacd30f1..89579be1e 100644 --- a/repo/js/AutoMonday/main.js +++ b/repo/js/AutoMonday/main.js @@ -516,21 +516,6 @@ return now >= cdTime; } - // 获取当前账户id - async function getCurrentUsername() { - await genshin.returnMainUi(); - const texts = await textOCR("", 0.3, 0, 2, 1751, 1050, 115, 25); - if (result.found) { - log.debug("当前用户:" + texts.text); - await genshin.returnMainUi(); - return texts.text; - } - log.info("未找到用户名"); - await genshin.returnMainUi(); - - return null; - } - // 自动战斗函数 async function autoFight(timeout) { const cts = new CancellationTokenSource(); @@ -1151,7 +1136,7 @@ TEAM = settings.TEAMname; - const username = await getCurrentUsername(); + const username = settings.username || "默认账户"; const cdRecordPath = `record/${username}_cd.txt`;// 修改CD记录文件路径,包含用户名 //设置分辨率和缩放 diff --git a/repo/js/AutoMonday/manifest.json b/repo/js/AutoMonday/manifest.json index 04f131229..5e93bf38c 100644 --- a/repo/js/AutoMonday/manifest.json +++ b/repo/js/AutoMonday/manifest.json @@ -1,7 +1,7 @@ { "manifest_version": 1, "name": "全自动周一", - "version": "1.3.1", + "version": "1.3.2", "tags": [ "周常", "纪行", diff --git a/repo/js/AutoMonday/settings.json b/repo/js/AutoMonday/settings.json index 3d4476bdb..eb0e070dc 100644 --- a/repo/js/AutoMonday/settings.json +++ b/repo/js/AutoMonday/settings.json @@ -4,6 +4,11 @@ "type": "checkbox", "label": "我已认真阅读readme文件及注意事项,并做好了相关设置" }, + { + "name": "username", + "type": "input-text", + "label": "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n\n账户名称(单账户无需理会)" + }, { "name": "ifZBY", "type": "checkbox",