diff --git a/repo/js/AutoPlan/config/config.js b/repo/js/AutoPlan/config/config.js index e3b4c7b93..8680b0775 100644 --- a/repo/js/AutoPlan/config/config.js +++ b/repo/js/AutoPlan/config/config.js @@ -4,6 +4,7 @@ import {ocrPhysical} from "../utils/physical"; const config = { //setting设置放在这个json run: { + retry_count: 3,//复活重试次数 config: '', // load_uid_config: false, loads: [],//加载方式list @@ -176,6 +177,7 @@ async function initConfig() { // config.user.physical.min = physical.min // 初始化uid config.user.uid = await ocrUid() + config.run.retry_count = (settings.retry_count?parseInt(settings.retry_count):config.run.retry_count) const bgi_tools_token = settings.bgi_tools_token || "Authorization= " const list = Array.from(bgi_tools_token.split("=")).map(item => item.trim()); config.bgi_tools.token.name = list[0] diff --git a/repo/js/AutoPlan/main.js b/repo/js/AutoPlan/main.js index df809bb6f..9153a21cf 100644 --- a/repo/js/AutoPlan/main.js +++ b/repo/js/AutoPlan/main.js @@ -88,7 +88,7 @@ async function autoDomain(autoFight) { log.debug(`副本轮数:${domainParam.DomainRoundNum}`) // 复活重试 - for (let i = 0; i < 5; i++) { + for (let i = 0; i < config.run.retry_count; i++) { try { await dispatcher.RunAutoDomainTask(domainParam); // 其他场景不重试 @@ -102,6 +102,7 @@ async function autoDomain(autoFight) { throw e; } } + await outDomainUI() } /** @@ -145,7 +146,7 @@ async function autoLeyLineOutcrop(autoLeyLineOutcrop) { param.isResinExhaustionMode = true; param.openModeCountMin = true; // 复活重试 - for (let i = 0; i < 5; i++) { + for (let i = 0; i < config.run.retry_count; i++) { try { await dispatcher.RunAutoLeyLineOutcropTask(param); // 其他场景不重试 diff --git a/repo/js/AutoPlan/settings.json b/repo/js/AutoPlan/settings.json index 40fde3c7a..4960f6a6e 100644 --- a/repo/js/AutoPlan/settings.json +++ b/repo/js/AutoPlan/settings.json @@ -17,6 +17,17 @@ "label": "自动秘境计划配置\n语法:说明太长 去看文档", "default": "" }, + { + "name": "retry_count", + "type": "select", + "label": "复活重试次数", + "options": [ + "1","2","3", + "4","5","6", + "7","8","9", + ] , + "default": "3" + }, { "type": "separator" }, @@ -39,8 +50,7 @@ "type": "input-text", "label": "bgi_tools推送全部配置api(去看文档)", "default": "http://127.0.0.1:8081/bgi/auto/plan/domain/json/all" - } -, + }, { "name": "bgi_tools_token", "type": "input-text",