Skip to content

Commit

Permalink
Merge pull request #467 from dawn23666/dev_shawn
Browse files Browse the repository at this point in the history
fix:mumu12adb断连
  • Loading branch information
ZhaoZuohong authored Jan 4, 2024
2 parents a886748 + 5f8c9d6 commit b8d7272
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
3 changes: 2 additions & 1 deletion arknights_mower/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ def main(c, p, o={}, child_conn=None):
else "com.hypergryph.arknights.bilibili"
) # 服务器
config.TAP_TO_LAUNCH = conf["tap_to_launch_game"]
config.fix_mumu12_adb_disconnect = conf["fix_mumu12_adb_disconnect"]
init_fhlr(child_conn)
Pipe.conn = child_conn
logger.info("开始运行Mower")
Expand Down Expand Up @@ -244,7 +245,7 @@ def initialize(tasks, scheduler=None):
"email_config": {
"mail_enable": conf["mail_enable"],
"subject": conf["mail_subject"],
"encryption": conf["custom_smtp_server"]["encryption"], #添加判断starttls的变量
"encryption": conf["custom_smtp_server"]["encryption"], # 添加判断starttls的变量
"account": conf["account"],
"pass_code": conf["pass_code"],
"recipients": conf["recipient"],
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 @@ -262,3 +262,4 @@ recruit_gap: 9
recruit_auto_5: 1
recruit_auto_only5: false
recruit_email_enable: true
fix_mumu12_adb_disconnect: false
5 changes: 4 additions & 1 deletion arknights_mower/utils/simulator.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
from os import system
import subprocess
from enum import Enum
from arknights_mower.utils.log import logger
import time

from arknights_mower.utils import config

class Simulator_Type(Enum):
Nox = "夜神"
Expand Down Expand Up @@ -42,6 +43,8 @@ def restart_simulator(data, stop=True, start=True):
cmd += '0'
if stop:
exec_cmd(cmd, data["simulator_folder"])
if data["name"] == 'MuMu12' and config.fix_mumu12_adb_disconnect:
system('taskkill /f /t /im adb.exe')
logger.info(f"关闭{simulator_type}模拟器")
time.sleep(2)
if simulator_type == Simulator_Type.Nox.value:
Expand Down

0 comments on commit b8d7272

Please sign in to comment.