mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-03-11 22:08:20 +08:00
Add: Task switch
This commit is contained in:
@@ -220,6 +220,20 @@ class AzurLaneConfig(ManualConfig, GeneratedConfig):
|
||||
else:
|
||||
raise TaskEnd
|
||||
|
||||
def task_switch(self):
|
||||
"""
|
||||
Check if needs to switch task.
|
||||
|
||||
Raises:
|
||||
TaskEnd: If task switched
|
||||
"""
|
||||
prev = self.task
|
||||
self.load()
|
||||
new = self.get_next()
|
||||
if prev != new:
|
||||
logger.info(f'Switch task `{prev}` to `{new}`')
|
||||
self.task_stop()
|
||||
|
||||
@property
|
||||
def campaign_name(self):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user