Merge remote-tracking branch 'upstream/master' into dev

This commit is contained in:
W1NDes 2025-09-13 00:41:14 +08:00
commit 0c8b5c766a
2 changed files with 13 additions and 8 deletions

View File

@ -262,6 +262,7 @@ class InfoHandler(ModuleBase):
"""
Guild popup info
"""
def handle_guild_popup_confirm(self):
if self.appear(GUILD_POPUP_CANCEL, offset=self._popup_offset) \
and self.appear(GUILD_POPUP_CONFIRM, offset=self._popup_offset, interval=2):
@ -281,6 +282,7 @@ class InfoHandler(ModuleBase):
"""
Mission popup info
"""
def handle_mission_popup_go(self):
if self.appear(MISSION_POPUP_ACK, offset=self._popup_offset) \
and self.appear(MISSION_POPUP_GO, offset=self._popup_offset, interval=2):
@ -464,9 +466,6 @@ class InfoHandler(ModuleBase):
self.interval_clear(STORY_SKIP_3)
else:
self._story_confirm.reset()
if self.appear_then_click(GAME_TIPS, offset=(20, 20), interval=2):
self.story_popup_timeout.reset()
return True
if self.appear_then_click(STORY_CLOSE, offset=(10, 10), interval=2):
self.story_popup_timeout.reset()
return True
@ -511,18 +510,22 @@ class InfoHandler(ModuleBase):
"""
Game tips
"""
def handle_game_tips(self):
"""
Returns:
bool: If handled
"""
if self.appear(GAME_TIPS, offset=(20, 20), interval=2):
if self.appear(GAME_TIPS, offset=(20, 20), interval=2) and self.image_color_count(
GAME_TIPS.button, color=(40, 40, 40), threshold=240, count=50):
self.device.click(GAME_TIPS)
return True
if self.appear(GAME_TIPS3, offset=(20, 20), interval=2):
if self.appear(GAME_TIPS3, offset=(20, 20), interval=2) and self.image_color_count(
GAME_TIPS3.button, color=(40, 40, 40), threshold=240, count=50):
self.device.click(GAME_TIPS)
return True
if self.appear(GAME_TIPS4, offset=(20, 20), interval=2):
if self.appear(GAME_TIPS4, offset=(20, 20), interval=2) and self.image_color_count(
GAME_TIPS4.button, color=(40, 40, 40), threshold=240, count=50):
self.device.click(GAME_TIPS)
return True
@ -531,6 +534,7 @@ class InfoHandler(ModuleBase):
"""
Manjuu loading
"""
def manjuu_count(self):
"""
detect manjuu count by template matching
@ -552,7 +556,7 @@ class InfoHandler(ModuleBase):
self.device.screenshot()
if not self.manjuu_count():
break
def handle_manjuu(self):
"""
Handle manjuu loading.

View File

@ -51,7 +51,8 @@ MEDAL_SHOP_SCROLL_250814 = ShopAdaptiveScroll(
name="MEDAL_SHOP_SCROLL_250814"
)
MEDAL_SHOP_SCROLL_250814.drag_threshold = 0.1
MEDAL_SHOP_SCROLL_250814.edge_threshold = 0.1
# A little bit larger than 0.1 to handle bottom
MEDAL_SHOP_SCROLL_250814.edge_threshold = 0.12
class ShopPriceOcr(DigitYuv):