mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-03-17 07:35:25 +08:00
Fix: notify when GameNotRunningError
This commit is contained in:
5
alas.py
5
alas.py
@@ -78,11 +78,6 @@ class AzurLaneAutoScript:
|
|||||||
return True
|
return True
|
||||||
except GameNotRunningError as e:
|
except GameNotRunningError as e:
|
||||||
logger.warning(e)
|
logger.warning(e)
|
||||||
handle_notify(
|
|
||||||
self.config.Error_OnePushConfig,
|
|
||||||
title=f"Alas <{self.config_name}> crashed",
|
|
||||||
content=f"<{self.config_name}> GameNotRunningError",
|
|
||||||
)
|
|
||||||
self.config.task_call('Restart')
|
self.config.task_call('Restart')
|
||||||
return True
|
return True
|
||||||
except (GameStuckError, GameTooManyClickError) as e:
|
except (GameStuckError, GameTooManyClickError) as e:
|
||||||
|
|||||||
@@ -1337,7 +1337,7 @@
|
|||||||
"CollectCoin": true,
|
"CollectCoin": true,
|
||||||
"CollectExp": true,
|
"CollectExp": true,
|
||||||
"CollectMission": true,
|
"CollectMission": true,
|
||||||
"CollectWeeklyMission": true
|
"CollectWeeklyMission": false
|
||||||
},
|
},
|
||||||
"Storage": {
|
"Storage": {
|
||||||
"Storage": {}
|
"Storage": {}
|
||||||
|
|||||||
@@ -7210,7 +7210,7 @@
|
|||||||
},
|
},
|
||||||
"CollectWeeklyMission": {
|
"CollectWeeklyMission": {
|
||||||
"type": "checkbox",
|
"type": "checkbox",
|
||||||
"value": true
|
"value": false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"Storage": {
|
"Storage": {
|
||||||
|
|||||||
@@ -463,7 +463,7 @@ Reward:
|
|||||||
CollectCoin: true
|
CollectCoin: true
|
||||||
CollectExp: true
|
CollectExp: true
|
||||||
CollectMission: true
|
CollectMission: true
|
||||||
CollectWeeklyMission: true
|
CollectWeeklyMission: false
|
||||||
GeneralShop:
|
GeneralShop:
|
||||||
UseGems: false
|
UseGems: false
|
||||||
Refresh: false
|
Refresh: false
|
||||||
|
|||||||
@@ -254,7 +254,7 @@ class GeneratedConfig:
|
|||||||
Reward_CollectCoin = True
|
Reward_CollectCoin = True
|
||||||
Reward_CollectExp = True
|
Reward_CollectExp = True
|
||||||
Reward_CollectMission = True
|
Reward_CollectMission = True
|
||||||
Reward_CollectWeeklyMission = True
|
Reward_CollectWeeklyMission = False
|
||||||
|
|
||||||
# Group `GeneralShop`
|
# Group `GeneralShop`
|
||||||
GeneralShop_UseGems = False
|
GeneralShop_UseGems = False
|
||||||
|
|||||||
@@ -248,6 +248,12 @@ class Device(Screenshot, Control, AppControl, Input):
|
|||||||
if self.app_is_running():
|
if self.app_is_running():
|
||||||
raise GameStuckError(f'Wait too long')
|
raise GameStuckError(f'Wait too long')
|
||||||
else:
|
else:
|
||||||
|
from module.notify import handle_notify
|
||||||
|
handle_notify(
|
||||||
|
self.config.Error_OnePushConfig,
|
||||||
|
title=f"Alas <{self.config.config_name}> crashed",
|
||||||
|
content=f"<{self.config.config_name}> GameNotRunningError"
|
||||||
|
)
|
||||||
raise GameNotRunningError('Game died')
|
raise GameNotRunningError('Game died')
|
||||||
|
|
||||||
def handle_control_check(self, button):
|
def handle_control_check(self, button):
|
||||||
|
|||||||
Reference in New Issue
Block a user