From a11e4d70cbed786b1ede8914afed7ac3879aeb79 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: Mon, 16 Mar 2026 02:46:15 +0800 Subject: [PATCH] feat: woods multi-checkbox (#2998) --- repo/js/AutoWoodcutting-Pathing/main.js | 3 +- repo/js/AutoWoodcutting-Pathing/manifest.json | 4 +- repo/js/AutoWoodcutting-Pathing/settings.json | 160 ++++-------------- 3 files changed, 39 insertions(+), 128 deletions(-) diff --git a/repo/js/AutoWoodcutting-Pathing/main.js b/repo/js/AutoWoodcutting-Pathing/main.js index 8f89a9b66..b27b6de91 100644 --- a/repo/js/AutoWoodcutting-Pathing/main.js +++ b/repo/js/AutoWoodcutting-Pathing/main.js @@ -500,7 +500,8 @@ const startTime = Date.now(); // 分别将填入的木材名称和数量转成数组 - let woodsArray = settings.woods ? settings.woods.split(/\s+/) : []; + // let woodsArray = settings.woods ? settings.woods.split(/\s+/) : []; + let woodsArray = Array.from(settings.woodsMultiCheckbox); let numbersArray = settings.numbers ? settings.numbers.split(/\s+/).map(Number).map(num => isNaN(num) ? 0 : num) : []; let woodInventoryNumber = settings.woodInventoryNumber ? (isNaN(settings.woodInventoryNumber) ? 2000 : settings.woodInventoryNumber) : 2000; let hasItto = settings.hasItto ? settings.hasItto : false; diff --git a/repo/js/AutoWoodcutting-Pathing/manifest.json b/repo/js/AutoWoodcutting-Pathing/manifest.json index bad3fcb11..e46356bd5 100644 --- a/repo/js/AutoWoodcutting-Pathing/manifest.json +++ b/repo/js/AutoWoodcutting-Pathing/manifest.json @@ -1,7 +1,7 @@ { "manifest_version": 1, "name": "自动伐木-地图追踪版", - "version": "3.0.7", + "version": "3.0.8", "description": "基于地图追踪的自动伐木,已支持6.0版本及之前的全部木材\n默认砍伐全部支持木材至2000上限\n自定义设置:\n-可更改砍伐木材种类和数量\n-可以单独设置每个木材数量\n-可设置队伍中是否包含一斗,按保底20%,计算砍伐数量时会除以1.2", "bgi_version": "0.53.0", "tags": [ @@ -21,4 +21,4 @@ ], "settings_ui": "settings.json", "main": "main.js" -} +} \ No newline at end of file diff --git a/repo/js/AutoWoodcutting-Pathing/settings.json b/repo/js/AutoWoodcutting-Pathing/settings.json index 76f31527a..53c2466ea 100644 --- a/repo/js/AutoWoodcutting-Pathing/settings.json +++ b/repo/js/AutoWoodcutting-Pathing/settings.json @@ -12,9 +12,40 @@ "default": "2000" }, { - "name": "woods", - "type": "input-text", - "label": "木材种类:空格分隔,不填默认全部支持木材" + "name": "woodsMultiCheckbox", + "type": "multi-checkbox", + "label": "木材种类:不勾选默认全部支持木材", + "options": [ + "桦木", + "萃华木", + "松木", + "却砂木", + "竹节", + "垂香木", + "杉木", + "梦见木", + "枫木", + "孔雀木", + "御伽木", + "辉木", + "业果木", + "证悟木", + "刺葵木", + "柽木", + "悬铃木", + "椴木", + "白梣木", + "香柏木", + "炬木", + "白栗栎木", + "灰灰楼林木", + "燃爆木", + "桃椰子木", + "银冷杉木", + "榛木", + "夏栎木", + "桤木" + ] }, { "name": "numbers", @@ -33,125 +64,4 @@ "label": "开启装备王树瑞佑检查", "default": true } - // { - // "name": "桦木", - // "type": "checkbox", - // "label": "桦木" - // }, - // { - // "name": "萃华木", - // "type": "checkbox", - // "label": "萃华木" - // }, - // { - // "name": "松木", - // "type": "checkbox", - // "label": "松木" - // }, - // { - // "name": "却砂木", - // "type": "checkbox", - // "label": "却砂木" - // }, - // { - // "name": "竹节", - // "type": "checkbox", - // "label": "竹节" - // }, - // { - // "name": "垂香木", - // "type": "checkbox", - // "label": "垂香木" - // }, - // { - // "name": "杉木", - // "type": "checkbox", - // "label": "杉木" - // }, - // { - // "name": "梦见木", - // "type": "checkbox", - // "label": "梦见木" - // }, - // { - // "name": "枫木", - // "type": "checkbox", - // "label": "枫木" - // }, - // { - // "name": "孔雀木", - // "type": "checkbox", - // "label": "孔雀木" - // }, - // { - // "name": "御伽木", - // "type": "checkbox", - // "label": "御伽木" - // }, - // { - // "name": "辉木", - // "type": "checkbox", - // "label": "辉木" - // }, - // { - // "name": "业果木", - // "type": "checkbox", - // "label": "业果木" - // }, - // { - // "name": "证悟木", - // "type": "checkbox", - // "label": "证悟木" - // }, - // { - // "name": "刺葵木", - // "type": "checkbox", - // "label": "刺葵木" - // }, - // { - // "name": "柽木", - // "type": "checkbox", - // "label": "柽木" - // }, - // { - // "name": "悬铃木", - // "type": "checkbox", - // "label": "悬铃木" - // }, - // { - // "name": "椴木", - // "type": "checkbox", - // "label": "椴木" - // }, - // { - // "name": "白梣木", - // "type": "checkbox", - // "label": "白梣木" - // }, - // { - // "name": "香柏木", - // "type": "checkbox", - // "label": "香柏木" - // }, - // { - // "name": "炬木", - // "type": "checkbox", - // "label": "炬木" - // }, - // { - // "name": "白栗栎木", - // "type": "checkbox", - // "label": "白栗栎木" - // }, - // { - // "name": "灰灰楼林木", - // "type": "checkbox", - // "label": "灰灰楼林木" - // }, - // { - // "name": "燃爆木", - // "type": "checkbox", - // "label": "燃爆木" - // } - -] +] \ No newline at end of file