From 4654d2ed56f3e2193bea81aedcaca874dde0c953 Mon Sep 17 00:00:00 2001 From: LA_DI_DA <11174151+0O0o0oOoO00@users.noreply.github.com> Date: Sun, 25 Aug 2024 12:19:20 +0800 Subject: [PATCH] Fix: check self in first start for maa submodule --- alas.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/alas.py b/alas.py index bd793b648..05765f3b6 100644 --- a/alas.py +++ b/alas.py @@ -33,6 +33,14 @@ class AzurLaneAutoScript: # Key: str, task name, value: int, failure count self.failure_record = {} + self.class_name = self.__class__.__name__ + self.is_azur = False + self.is_ark = False + if self.class_name == "AzurLaneAutoScript": + self.is_azur = True + elif self.class_name == "ArknightsAutoScript": + self.is_ark = True + @cached_property def config(self): try: @@ -652,7 +660,7 @@ class AzurLaneAutoScript: del_cached_property(self, 'config') continue - if not self.device.app_is_running(): + if self.is_azur and not self.device.app_is_running(): self.config.task_call('Restart') self.is_first_task = False continue