From 2f18ad24782e893c5e28c38bf63d7e6660fa2a9c Mon Sep 17 00:00:00 2001 From: NaraLan0502 <129516870+NaraLan0502@users.noreply.github.com> Date: Fri, 2 May 2025 22:24:23 +0800 Subject: [PATCH] =?UTF-8?q?[js=EF=BC=9A=E4=BC=A0=E9=80=81=E8=87=B3?= =?UTF-8?q?=E6=8C=87=E5=AE=9A=E5=90=88=E6=88=90=E5=8F=B0]=E4=BF=AEbug=20(#?= =?UTF-8?q?687)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Add files via upload * 传送至指定合成台 * Delete repo/js/蒙德合成台.json * Delete repo/js/main.js * Delete repo/js/manifest.json * Delete repo/js/settings.json * Delete repo/js/枫丹合成台.json * Delete repo/js/璃月合成台.json * Delete repo/js/稻妻合成台.json * Update settings.json * 去除main.js里的sleep函数,jsv8引擎不再必报错(maybe) js小白,不要拷打我了😭😭😭 * Update main.js 新增默认选项 * Update settings.json * Update manifest.json --- repo/js/传送至指定合成台/main.js | 10 +++++++--- repo/js/传送至指定合成台/manifest.json | 4 ++-- repo/js/传送至指定合成台/settings.json | 2 +- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/repo/js/传送至指定合成台/main.js b/repo/js/传送至指定合成台/main.js index 6dbd35e5..79dd3c56 100644 --- a/repo/js/传送至指定合成台/main.js +++ b/repo/js/传送至指定合成台/main.js @@ -2,8 +2,6 @@ async function AutoPath(locationName) { try { let filePath = `assets/${locationName}.json`; await pathingScript.runFile(filePath); - sleep(2000); - return true; } catch (error) { log.error(`执行 ${locationName} 路径时发生错误`); @@ -12,6 +10,7 @@ async function AutoPath(locationName) { return false; } + ( async function () { try { @@ -19,10 +18,15 @@ async function AutoPath(locationName) { setGameMetrics(1920, 1080, 1) // 读取配置文件 let location = settings.location; + if(location == undefined){ + location = "璃月合成台"; + log.info(`未设置传送位置,默认前往 ${location}...`); + } + log.info(`正在前往 ${location}...`); await AutoPath(location); } catch (e) { log.error("传送失败,请检查设置"); return; } } -)(); \ No newline at end of file +)(); diff --git a/repo/js/传送至指定合成台/manifest.json b/repo/js/传送至指定合成台/manifest.json index ecbc2b36..b89cafdf 100644 --- a/repo/js/传送至指定合成台/manifest.json +++ b/repo/js/传送至指定合成台/manifest.json @@ -1,8 +1,8 @@ { "manifest_version": 1, "name": "传送至指定合成台", - "version": "1.0", - "description": "传送至指定合成,不建议传送到蒙德合成台(勾八蒂玛乌斯和玛格丽特)", + "version": "1.0.1", + "description": "传送至指定合成台,不建议传送到蒙德合成台(勾八蒂玛乌斯和玛格丽特)", "authors": [ { "name": "naralan", diff --git a/repo/js/传送至指定合成台/settings.json b/repo/js/传送至指定合成台/settings.json index cd0958f8..4b433e12 100644 --- a/repo/js/传送至指定合成台/settings.json +++ b/repo/js/传送至指定合成台/settings.json @@ -2,7 +2,7 @@ { "name": "location", "type": "select", - "label": "指定合成台", + "label": "指定合成台(默认:璃月合成台)", "options": [ "蒙德合成台", "璃月合成台",