Skip to content

Commit

Permalink
为跑单前返回首页添加选项
Browse files Browse the repository at this point in the history
  • Loading branch information
ZhaoZuohong committed Jan 5, 2024
1 parent 177debd commit ce7071d
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 2 deletions.
1 change: 1 addition & 0 deletions arknights_mower/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ def main(c, p, o={}, child_conn=None):
) # 服务器
config.TAP_TO_LAUNCH = conf["tap_to_launch_game"]
config.fix_mumu12_adb_disconnect = conf["fix_mumu12_adb_disconnect"]
config.grandet_back_to_index = conf["run_order_grandet_mode"]["back_to_index"]
init_fhlr(child_conn)
Pipe.conn = child_conn
logger.info("开始运行Mower")
Expand Down
5 changes: 3 additions & 2 deletions arknights_mower/solvers/base_schedule.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
from arknights_mower.utils.news import get_update_time
from arknights_mower.utils import rapidocr
from arknights_mower.utils.simulator import restart_simulator
from arknights_mower.utils import config
import cv2

from ctypes import CFUNCTYPE, c_int, c_char_p, c_void_p
Expand Down Expand Up @@ -435,8 +436,8 @@ def infra_main(self):
get_time = False
if TaskTypes.SHIFT_OFF == self.task.type:
get_time = True
if TaskTypes.RUN_ORDER == self.task.type and not self.refresh_connecting and self.op_data.config.run_order_buffer_time > 0:
logger.info("退回主界面以确保跑单前的登录状态")
if config.grandet_back_to_index and TaskTypes.RUN_ORDER == self.task.type and not self.refresh_connecting and self.op_data.config.run_order_buffer_time > 0:
logger.info("跑单前返回主界面以保持登录状态")
self.back_to_index()
self.refresh_connecting = True
return
Expand Down
1 change: 1 addition & 0 deletions arknights_mower/templates/conf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,7 @@ sss:
run_order_grandet_mode:
enable: true
buffer_time: 30
back_to_index: false
server_push_enable: false
sendKey: ''
recruit_gap: 9
Expand Down
5 changes: 5 additions & 0 deletions ui/src/pages/Settings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,11 @@ import { render_op_label, render_op_tag } from '@/utils/op_select'
</template>
<n-input-number v-model:value="run_order_grandet_mode.buffer_time" />
</n-form-item>
<n-form-item v-if="run_order_grandet_mode.enable" :show-label="false">
<n-checkbox v-model:checked="run_order_grandet_mode.back_to_index">
跑单前返回主界面以保持登录状态
</n-checkbox>
</n-form-item>
<n-form-item>
<template #label>
<span>无人机使用房间</span>
Expand Down

0 comments on commit ce7071d

Please sign in to comment.