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

Refactor: Standardize the use of match_template_color()

This commit is contained in:
LmeSzinc
2024-12-09 16:09:34 +08:00
parent 164db6f4da
commit ba5b853cb9
22 changed files with 79 additions and 66 deletions

View File

@@ -183,8 +183,7 @@ class BuyFurniture(UI):
False if Failed buy
"""
self.enter_first_furniture_details_page()
if self.appear(DORM_FURNITURE_COUNTDOWN, offset=(20, 20)) \
and DORM_FURNITURE_COUNTDOWN.match_appear_on(self.device.image):
if self.match_template_color(DORM_FURNITURE_COUNTDOWN, offset=(20, 20)):
logger.info("There is a time-limited furniture available for buy")
if self.buy_furniture_once(self.config.BuyFurniture_BuyOption):