Upd: Add another state of _dungeon_wait_survival_index_loaded() end

This commit is contained in:
LmeSzinc 2024-06-20 02:03:41 +08:00
parent a7c823f1d8
commit 64fa1797b0
5 changed files with 19 additions and 6 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.2 KiB

View File

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

View File

Before

Width:  |  Height:  |  Size: 6.6 KiB

After

Width:  |  Height:  |  Size: 6.6 KiB

View File

@ -143,10 +143,20 @@ SURVIVAL_INDEX_CLICK = ButtonWrapper(
button=(332, 94, 370, 133), button=(332, 94, 370, 133),
), ),
) )
SURVIVAL_INDEX_LOADED = ButtonWrapper( SURVIVAL_INDEX_OE_LOADED = ButtonWrapper(
name='SURVIVAL_INDEX_LOADED', name='SURVIVAL_INDEX_OE_LOADED',
share=Button( share=Button(
file='./assets/share/dungeon/ui/SURVIVAL_INDEX_LOADED.png', file='./assets/share/dungeon/ui/SURVIVAL_INDEX_OE_LOADED.png',
area=(473, 207, 498, 232),
search=(453, 187, 518, 252),
color=(185, 135, 74),
button=(473, 207, 498, 232),
),
)
SURVIVAL_INDEX_SU_LOADED = ButtonWrapper(
name='SURVIVAL_INDEX_SU_LOADED',
share=Button(
file='./assets/share/dungeon/ui/SURVIVAL_INDEX_SU_LOADED.png',
area=(451, 286, 476, 302), area=(451, 286, 476, 302),
search=(449, 263, 489, 356), search=(449, 263, 489, 356),
color=(142, 150, 197), color=(142, 150, 197),

View File

@ -296,8 +296,11 @@ class DungeonUI(DungeonState):
if timeout.reached(): if timeout.reached():
logger.warning('Wait survival index loaded timeout') logger.warning('Wait survival index loaded timeout')
return False return False
if self.appear(SURVIVAL_INDEX_LOADED): if self.appear(SURVIVAL_INDEX_SU_LOADED):
logger.info('Survival index loaded') logger.info('Survival index loaded, SURVIVAL_INDEX_SU_LOADED')
return True
if self.appear(SURVIVAL_INDEX_OE_LOADED):
logger.info('Survival index loaded, SURVIVAL_INDEX_OE_LOADED')
return True return True
def _dungeon_wait_treasures_lightward_loaded(self, skip_first_screenshot=True): def _dungeon_wait_treasures_lightward_loaded(self, skip_first_screenshot=True):
@ -703,7 +706,7 @@ class DungeonUI(DungeonState):
self._rogue_teleport() self._rogue_teleport()
""" """
self.dungeon_tab_goto(KEYWORDS_DUNGEON_TAB.Survival_Index) self.dungeon_tab_goto(KEYWORDS_DUNGEON_TAB.Survival_Index)
if self.appear(SURVIVAL_INDEX_LOADED): if self.appear(SURVIVAL_INDEX_SU_LOADED):
logger.info('Already at nav Simulated_Universe') logger.info('Already at nav Simulated_Universe')
else: else:
self._dungeon_nav_goto(KEYWORDS_DUNGEON_NAV.Simulated_Universe) self._dungeon_nav_goto(KEYWORDS_DUNGEON_NAV.Simulated_Universe)