mirror of
https://github.com/sui-feng-cb/AzurLaneAutoScript1.git
synced 2026-08-18 20:45:58 +08:00
Merge branch 'dev'
This commit is contained in:
8
alas.py
8
alas.py
@@ -629,15 +629,17 @@ class AzurLaneAutoScript:
|
||||
failed = deep_get(self.failure_record, keys=task, default=0)
|
||||
failed = 0 if success else failed + 1
|
||||
deep_set(self.failure_record, keys=task, value=failed)
|
||||
if failed >= 3 or (self.config.Error_StrictRestart and failed >= 1 and task in RESTART_SENSITIVE_TASKS):
|
||||
should_restrict = (self.config.Error_RestrictRestart and task in RESTART_SENSITIVE_TASKS
|
||||
and (task == 'OpsiCrossMonth' or self.config.logger_used))
|
||||
if failed >= 3 or (failed >= 1 and should_restrict):
|
||||
logger.critical(f"Task `{task}` failed {failed} or more times.")
|
||||
logger.critical("Possible reason #1: You haven't used it correctly. "
|
||||
"Please read the help text of the options.")
|
||||
logger.critical("Possible reason #2: There is a problem with this task. "
|
||||
"Please contact developers or try to fix it yourself.")
|
||||
if self.config.Error_StrictRestart and task in RESTART_SENSITIVE_TASKS:
|
||||
if should_restrict:
|
||||
logger.critical("Possible reason #3: This is a restart sensitive task. "
|
||||
"Please take over the game manually or turn off 'StrictRestart' option.")
|
||||
"Please take over the game manually or turn off 'RestrictRestart' option.")
|
||||
logger.critical('Request human takeover')
|
||||
|
||||
handle_notify(
|
||||
|
||||
Reference in New Issue
Block a user