mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-03-12 08:38:20 +08:00
Refactor: More accurate exceptions and add friendly advices
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
from module.base.utils import *
|
||||
from module.config.config import AzurLaneConfig
|
||||
from module.exception import ScriptError
|
||||
from module.logger import logger
|
||||
from module.map_detection.utils import *
|
||||
from module.map_detection.utils_assets import *
|
||||
@@ -163,7 +164,9 @@ class GridPredictor:
|
||||
for name, template in self.template_enemy_genre.items():
|
||||
if template is None:
|
||||
logger.warning(f'Enemy detection template not found: {name}')
|
||||
exit(1)
|
||||
logger.warning('Please create it with dev_tools/relative_record.py or dev_tools/relative_crop.py, '
|
||||
'then place it under ./assets/<server>/template')
|
||||
raise ScriptError(f'Enemy detection template not found: {name}')
|
||||
|
||||
short_name = name[6:] if name.startswith('Siren_') else name
|
||||
scaling = scaling_dic.get(short_name, 1)
|
||||
|
||||
Reference in New Issue
Block a user