Skip to content

Commit

Permalink
Merge pull request #16 from DLmaster361/dev
Browse files Browse the repository at this point in the history
对于MAAv5.12.1版本后两个字段`Start.RunDirectly`与`Start.OpenEmulatorAfterLaunch`的适配
  • Loading branch information
DLmaster361 authored Jan 22, 2025
2 parents 6960184 + a1fd277 commit fe87547
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 4 deletions.
31 changes: 29 additions & 2 deletions app/models/MAA.py
Original file line number Diff line number Diff line change
Expand Up @@ -661,10 +661,20 @@ def set_maa(self, mode, index):
data["Configurations"]["Default"][
"MainFunction.PostActions"
] = "12" # 完成后退出MAA和模拟器
data["Global"]["Start.RunDirectly"] = "True" # 启动MAA后直接运行

# v5.1.11版本对于以下字段处理
# 启动MAA后直接运行
data["Global"]["Start.RunDirectly"] = "True"
# 启动MAA后自动开启模拟器
data["Global"][
"Start.OpenEmulatorAfterLaunch"
] = "True" # 启动MAA后自动开启模拟器
] = "True"

# v5.1.12版本对以下字段处理
# 启动MAA后直接运行
data["Configurations"]["Default"]["Start.OpenEmulatorAfterLaunch"] = "True"
# 启动MAA后自动开启模拟器
data["Configurations"]["Default"]["Start.RunDirectly"] = "True"

if self.if_silence:
data["Global"]["Start.MinimizeDirectly"] = "True" # 启动MAA后直接最小化
Expand Down Expand Up @@ -868,8 +878,17 @@ def set_maa(self, mode, index):
data["Configurations"]["Default"][
"MainFunction.PostActions"
] = "8" # 完成后退出MAA

# v5.1.11版本对于以下字段处理
data["Global"]["Start.RunDirectly"] = "True" # 启动MAA后直接运行
data["Global"]["Start.MinimizeDirectly"] = "True" # 启动MAA后直接最小化
# v5.1.12版本对以下字段处理
# 启动MAA后直接运行
data["Configurations"]["Default"]["Start.OpenEmulatorAfterLaunch"] = "True"
# 启动MAA后自动开启模拟器
data["Configurations"]["Default"]["Start.RunDirectly"] = "True"


data["Global"]["GUI.UseTray"] = "True" # 显示托盘图标
data["Global"]["GUI.MinimizeToTray"] = "True" # 最小化时隐藏至托盘
# 启动MAA后自动开启模拟器
Expand Down Expand Up @@ -938,11 +957,19 @@ def set_maa(self, mode, index):
data["Configurations"]["Default"][
"MainFunction.PostActions"
] = "0" # 完成后无动作

# v5.11.1及以下版本的字段处理
data["Global"]["Start.RunDirectly"] = "False" # 启动MAA后直接运行
data["Global"][
"Start.OpenEmulatorAfterLaunch"
] = "False" # 启动MAA后自动开启模拟器

# v5.1.12版本对以下字段处理
# 启动MAA后直接运行
data["Configurations"]["Default"]["Start.OpenEmulatorAfterLaunch"] = "False"
# 启动MAA后自动开启模拟器
data["Configurations"]["Default"]["Start.RunDirectly"] = "False"

if self.if_silence:
data["Global"][
"Start.MinimizeDirectly"
Expand Down
4 changes: 2 additions & 2 deletions resources/docs/MAA_config_info.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
"TaskQueue.Mall.IsChecked": "True" #获取信用及购物
"TaskQueue.AutoRoguelike.IsChecked": "False" #自动肉鸽
"TaskQueue.Reclamation.IsChecked": "False" #生息演算
"Start.RunDirectly": "True" #启动MAA后直接运行
"Start.OpenEmulatorAfterLaunch": "True" #启动MAA后自动开启模拟器
#刷理智
"MainFunction.Stage1": "" #主关卡
"MainFunction.Stage2": "" #备选关卡1
Expand Down Expand Up @@ -37,9 +39,7 @@ G"Timer.Timer1": "False" #时间设置1
G"VersionUpdate.ScheduledUpdateCheck": "True" #定时检查更新
G"VersionUpdate.AutoDownloadUpdatePackage": "True" #自动下载更新包
G"VersionUpdate.AutoInstallUpdatePackage": "True" #自动安装更新包
G"Start.RunDirectly": "True" #启动MAA后直接运行
G"Start.MinimizeDirectly": "True" #启动MAA后直接最小化
G"Start.OpenEmulatorAfterLaunch": "True" #启动MAA后自动开启模拟器
G"GUI.UseTray": "True" #显示托盘图标
G"GUI.MinimizeToTray": "False" #最小化时隐藏至托盘
"Start.EmulatorPath" #模拟器路径

0 comments on commit fe87547

Please sign in to comment.