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