1
0
mirror of https://gitee.com/sui-feng-cb/AzurLaneAutoScript1 synced 2026-03-12 10:58:21 +08:00

Add: Added option to enable or disable some exceptions

-ALAS will withdraw from the map when it occurs instead of stopping
This commit is contained in:
whoamikyo
2020-06-19 05:34:40 -03:00
parent 7a431f90a8
commit 5efc957abb
7 changed files with 13 additions and 2 deletions

View File

@@ -87,8 +87,12 @@ class CampaignBase(Map):
result = func()
if not result:
logger.warning('No combat executed.')
raise ScriptError('No combat executed.')
logger.warning('ScriptError, No combat executed.')
if self.config.ENABLE_EXCEPTION:
raise ScriptError('No combat executed.')
else:
logger.warning('ScriptError, Withdrawing because enable_exception = no')
self.withdraw()
return result