mirror of
https://github.com/LmeSzinc/AzurLaneAutoScript.git
synced 2025-01-08 12:07:36 +08:00
Opt: Better tips when having wrong configs
This commit is contained in:
parent
70b35b6ad0
commit
cd0204f455
4
alas.py
4
alas.py
@ -357,9 +357,9 @@ class AzurLaneAutoScript:
|
||||
deep_set(failure_record, keys=task, value=failed)
|
||||
if failed >= 3:
|
||||
logger.critical(f"Task `{task}` failed 3 or more times.")
|
||||
logger.critical("Possible reason 1: You haven't used it correctly. "
|
||||
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. "
|
||||
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_HandleError:
|
||||
self.config.Scheduler_Enable = False
|
||||
|
@ -55,8 +55,8 @@ class CampaignRun(UI):
|
||||
files = [f[:-3] for f in os.listdir(folder) if f[-3:] == '.py']
|
||||
logger.warning(f'Existing files: {files}')
|
||||
|
||||
logger.critical(f'Possible reason 1: This event ({folder}) does not have {name}')
|
||||
logger.critical(f'Possible reason 2: You are using an old Alas, '
|
||||
logger.critical(f'Possible reason #1: This event ({folder}) does not have {name}')
|
||||
logger.critical(f'Possible reason #2: You are using an old Alas, '
|
||||
'please check for update, or make map files yourself using dev_tools/map_extractor.py')
|
||||
raise RequestHumanTakeover
|
||||
|
||||
|
@ -603,4 +603,6 @@ class ConfigTypeChecker:
|
||||
logger.critical(f'Task `{func}` has an invalid setting {".".join(path)}="{str(value)}". '
|
||||
f'Current type: {type_to_str(value)}, expected type: {type_to_str(typ)}')
|
||||
logger.critical('Please check your settings')
|
||||
raise RequestHumanTakeover
|
||||
raise RequestHumanTakeover(
|
||||
f'Task `{func}` has an invalid setting {".".join(path)}="{str(value)}". '
|
||||
f'Current type: {type_to_str(value)}, expected type: {type_to_str(typ)}')
|
||||
|
@ -118,13 +118,13 @@ class MapOperation(MysteryHandler, FleetPreparation, Retirement, FastForwardHand
|
||||
# Check errors
|
||||
if campaign_click > 5:
|
||||
logger.critical(f"Failed to enter {button}, too many click on {button}")
|
||||
logger.critical("Possible reason 1: You haven't reached the commander level to unlock this stage.")
|
||||
logger.critical("Possible reason #1: You haven't reached the commander level to unlock this stage.")
|
||||
raise RequestHumanTakeover
|
||||
if fleet_click > 5:
|
||||
logger.critical(f"Failed to enter {button}, too many click on FLEET_PREPARATION")
|
||||
logger.critical("Possible reason 1: "
|
||||
logger.critical("Possible reason #1: "
|
||||
"Your fleets haven't satisfied the stat restrictions of this stage.")
|
||||
logger.critical("Possible reason 2: "
|
||||
logger.critical("Possible reason #2: "
|
||||
"This stage can only be farmed once a day, "
|
||||
"but it's the second time that you are entering")
|
||||
raise RequestHumanTakeover
|
||||
|
@ -119,7 +119,8 @@ class GridInfo:
|
||||
'MY': 'is_mystery',
|
||||
'AM': 'is_ammo',
|
||||
'FR': 'is_fortress',
|
||||
'==': 'is_cleared'
|
||||
'MI': 'is_missile_attack',
|
||||
'==': 'is_cleared',
|
||||
}
|
||||
for key, value in dic.items():
|
||||
if self.__getattribute__(value):
|
||||
|
Loading…
Reference in New Issue
Block a user