mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-03-12 15:36:59 +08:00
Refactor: 抽象出处理确认弹窗的逻辑
- 删除了一些无用的assets - 纠正了一些拼写错误
This commit is contained in:
@@ -1,15 +1,9 @@
|
||||
from module.base.base import ModuleBase
|
||||
from module.handler.assets import LOW_EMOTION_CONFIRM, LOW_EMOTION_CANCEL
|
||||
from module.handler.popup import PopupHandler
|
||||
|
||||
|
||||
class LowEmotionHandler(ModuleBase):
|
||||
class LowEmotionHandler(PopupHandler):
|
||||
def handle_combat_low_emotion(self):
|
||||
if not self.config.IGNORE_LOW_EMOTION_WARN:
|
||||
return False
|
||||
|
||||
if self.appear(LOW_EMOTION_CANCEL, offset=30)\
|
||||
and self.appear(LOW_EMOTION_CONFIRM, offset=30, interval=1):
|
||||
self.device.click(LOW_EMOTION_CONFIRM)
|
||||
return True
|
||||
else:
|
||||
return False
|
||||
return self.handle_popup_confirm()
|
||||
|
||||
Reference in New Issue
Block a user