diff --git a/repo/js/AEscoffier_chef/README.md b/repo/js/AEscoffier_chef/README.md index 94a8dcf97..92dff9a6d 100644 --- a/repo/js/AEscoffier_chef/README.md +++ b/repo/js/AEscoffier_chef/README.md @@ -648,6 +648,10 @@ - 更新日志
点击展开 + + - ver 2.3.7 + + 1. 优化了材料余量读取,确保被作为培养素材的材料数量也能正常读取 - ver 2.3.6 diff --git a/repo/js/AEscoffier_chef/main.js b/repo/js/AEscoffier_chef/main.js index 7a1194b19..9a097973d 100644 --- a/repo/js/AEscoffier_chef/main.js +++ b/repo/js/AEscoffier_chef/main.js @@ -301,6 +301,20 @@ return item_num; } } + } else if (ocr_area[i].text.includes("培养需求")) { + refer_y = ocr_area[i].y; + + for (let j = 0; j < ocr_area.length; j++) { + let string = ocr_area[j].text.replace(/\D/g, ''); + if (string && ocr_area[j].y > refer_y - 12 && ocr_area[j].y < refer_y + 12) { // 纯数字且y坐标范围合理 + string = string.split("/")[0].replace(/\D/g, ''); + item_num = parseInt(string, 10); + log.debug(`识别到物品数量: ${item_num}`); + click(x, y); // 点击空白处返回 + await sleep(500); + return item_num; + } + } } if (item_num !== -1) break; } @@ -875,7 +889,7 @@ click(material_site[i]["x"], material_site[i]["y1"]); await sleep(500); let ocrResult = await Ocr(881, 763, 158, 267); - if (ocrResult && ocrResult.text.includes("当前拥有")) { + if (ocrResult && (ocrResult.text.includes("当前拥有") || ocrResult.text.includes("培养需求"))) { flag = true; } else { // 点击食材(下) @@ -884,7 +898,7 @@ click(material_site[i]["x"], material_site[i]["y2"]); await sleep(500); let ocrResult = await Ocr(881, 763, 158, 267); - if (ocrResult && ocrResult.text.includes("当前拥有")) { + if (ocrResult && (ocrResult.text.includes("当前拥有") || ocrResult.text.includes("培养需求"))) { flag = true; } } diff --git a/repo/js/AEscoffier_chef/manifest.json b/repo/js/AEscoffier_chef/manifest.json index c462a11ec..f745674b2 100644 --- a/repo/js/AEscoffier_chef/manifest.json +++ b/repo/js/AEscoffier_chef/manifest.json @@ -1,7 +1,7 @@ { "manifest_version": 1, "name": "一只爱可菲", - "version": "2.3.6", + "version": "2.3.7", "bgi_version": "0.55.0", "description": "专精料理制作的爱可菲(自动烹饪及解锁、特殊料理、食材加工)[内置料理数据已更新至月之四]\n自动烹饪:烹饪精度自定义、一键全解锁、分类选择料理、自动处理食材不足等异常\n特殊料理:支持根据概率计算产出、支持全部的特殊料理\n食材加工:食材持有量检测、可自选制作鱼肉的配方、可选等待加工完成或跳过、矿石加速", "tags": [ diff --git a/repo/js/AutoFishingTeyvat-Bait/main.js b/repo/js/AutoFishingTeyvat-Bait/main.js index a500ae83f..51ced0fd5 100644 --- a/repo/js/AutoFishingTeyvat-Bait/main.js +++ b/repo/js/AutoFishingTeyvat-Bait/main.js @@ -499,6 +499,19 @@ await sleep(500); } } + } else if (ocr_area[i].text.includes("培养需求")) { + refer_y = ocr_area[i].y; + + for (let j = 0; j < ocr_area.length; j++) { + let string = ocr_area[j].text.replace(/\D/g, ''); + if (string && ocr_area[j].y > refer_y - 12 && ocr_area[j].y < refer_y + 12) { // 纯数字且y坐标范围合理 + string = string.split("/")[0].replace(/\D/g, ''); + material_num[k === 0 ? 0: 1] = parseInt(string, 10); + log.info(`识别到 ${name} 的原料${k === 0 ? 1: 2}(${bait_msg[name][k === 0 ? 0: 1]})数量: ${material_num[k === 0 ? 0: 1]}`); + click(1480, 974); // 点击空白处返回 + await sleep(500); + } + } } if (material_num[k === 0 ? 0: 1] !== -1) break; } diff --git a/repo/js/AutoFishingTeyvat-Bait/manifest.json b/repo/js/AutoFishingTeyvat-Bait/manifest.json index 776463604..e5816cd3f 100644 --- a/repo/js/AutoFishingTeyvat-Bait/manifest.json +++ b/repo/js/AutoFishingTeyvat-Bait/manifest.json @@ -1,7 +1,7 @@ { "manifest_version": 1, "name": "提瓦特自动饵料机[测试版]", - "version": "1.0.3", + "version": "1.0.4", "bgi_version": "0.55.0", "description": "全自动合成鱼饵(支持自动获取原料)", "authors": [