mirror of
https://github.com/LmeSzinc/AzurLaneAutoScript.git
synced 2025-01-08 12:07:36 +08:00
Opt: Raise error if user is using EventABCD before stages unlocked
This commit is contained in:
parent
cb1d4f24d3
commit
1736d3e6fc
@ -3,6 +3,7 @@ import os
|
|||||||
from module.config.config import TaskEnd
|
from module.config.config import TaskEnd
|
||||||
from module.config.utils import get_server_last_update
|
from module.config.utils import get_server_last_update
|
||||||
from module.event.base import STAGE_FILTER, EventBase, EventStage
|
from module.event.base import STAGE_FILTER, EventBase, EventStage
|
||||||
|
from module.exception import ScriptEnd, RequestHumanTakeover
|
||||||
from module.logger import logger
|
from module.logger import logger
|
||||||
|
|
||||||
|
|
||||||
@ -45,6 +46,18 @@ class CampaignABCD(EventBase):
|
|||||||
except TaskEnd:
|
except TaskEnd:
|
||||||
# Catch task switch
|
# Catch task switch
|
||||||
pass
|
pass
|
||||||
|
except ScriptEnd as e:
|
||||||
|
# Raise from CampaignUI.ensure_campaign_ui()
|
||||||
|
if str(e) == 'Campaign name error':
|
||||||
|
task = self.config.task.command
|
||||||
|
logger.critical(
|
||||||
|
f'Cannot find stage "{stage}". '
|
||||||
|
f'Task "{task}" is for 3X daily PT, if you have not unlock {stage}, '
|
||||||
|
f'you should use task "Event" to unlock it instead of using task "{task}"')
|
||||||
|
raise RequestHumanTakeover
|
||||||
|
else:
|
||||||
|
raise
|
||||||
|
|
||||||
if self.run_count > 0:
|
if self.run_count > 0:
|
||||||
with self.config.multi_set():
|
with self.config.multi_set():
|
||||||
self.config.EventDaily_LastStage = stage
|
self.config.EventDaily_LastStage = stage
|
||||||
|
Loading…
Reference in New Issue
Block a user