mirror of
https://github.com/babalae/bettergi-scripts-list.git
synced 2026-03-26 05:09:52 +08:00
feat(plan): 添加循环体力计划功能
- 在配置文件中添加 loop_plan 选项,默认为 false - 将设置项 loop_plan 与配置项进行绑定 - 修改主循环逻辑,根据 loop_plan 配置决定是否启用循环体力计划 - 在设置界面添加循环体力计划的复选框选项
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
import {ocrUid} from "../utils/uid";
|
||||
import {ocrPhysical} from "../utils/physical";
|
||||
|
||||
const config = {
|
||||
//setting设置放在这个json
|
||||
run: {
|
||||
loop_plan: false,//启用循环体力计划
|
||||
retry_count: 3,//复活重试次数
|
||||
config: '',
|
||||
// load_uid_config: false,
|
||||
@@ -180,6 +180,7 @@ async function initConfig() {
|
||||
// 初始化uid
|
||||
config.user.uid = await ocrUid()
|
||||
config.run.retry_count = (settings.retry_count?parseInt(settings.retry_count):config.run.retry_count)
|
||||
config.run.loop_plan= settings.loop_plan || config.run.loop_plan
|
||||
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]
|
||||
|
||||
@@ -468,7 +468,7 @@ async function main() {
|
||||
//循环跑
|
||||
while (true) {
|
||||
await autoRunList(list);
|
||||
if(false){
|
||||
if(config.run.loop_plan){
|
||||
//循环
|
||||
if (config.user.physical.current < config.user.physical.min) {
|
||||
//体力耗尽
|
||||
|
||||
@@ -17,6 +17,11 @@
|
||||
"label": "自动秘境计划配置\n语法:说明太长 去看文档",
|
||||
"default": ""
|
||||
},
|
||||
{
|
||||
"name": "loop_plan",
|
||||
"type": "checkbox",
|
||||
"label": "循环体力计划"
|
||||
},
|
||||
{
|
||||
"name": "retry_count",
|
||||
"type": "select",
|
||||
|
||||
Reference in New Issue
Block a user