Skip to content

Conversation

@megumiss
Copy link
Contributor

@megumiss megumiss commented Sep 11, 2024

通过任务的方式实现maa自动关闭游戏

Comment on lines +497 to +505
def aftercare_operation(self):
if self.config.MaaAftercareOperation_WhenTaskQueueEmpty == 'close_game':
self.maa_start('CloseDown', {
"client_type": self.config.MaaEmulator_PackageName
})
if self.config.waiting_task:
nexttime = self.config.waiting_task[0].next_run
self.config.task_delay(target=nexttime, task="MaaStartup")
self.config.task_delay(server_update=True)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

等待下一个任务应该是调度器层次考虑的,任务层次应该只完成自己的任务

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

没有办法,需要保证关闭游戏后, 下一个任务执行前游戏是开启的

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants