Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add: add maa close down task #4168

Open
wants to merge 3 commits into
base: dev
Choose a base branch
from

Conversation

mackerel-12138
Copy link
Contributor

@mackerel-12138 mackerel-12138 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