mirror of
https://github.com/LmeSzinc/StarRailCopilot.git
synced 2024-11-16 06:25:24 +00:00
Upd: extract dungeon_enter check button as a function parameter
This commit is contained in:
parent
4f8c1f89c3
commit
6e9661401b
@ -192,7 +192,7 @@ class DungeonUI(UI):
|
|||||||
|
|
||||||
return True
|
return True
|
||||||
|
|
||||||
def _dungeon_enter(self, dungeon, skip_first_screenshot=True):
|
def _dungeon_enter(self, dungeon, enter_check_button=COMBAT_PREPARE, skip_first_screenshot=True):
|
||||||
"""
|
"""
|
||||||
Pages:
|
Pages:
|
||||||
in: page_guide, Survival_Index, nav including dungeon
|
in: page_guide, Survival_Index, nav including dungeon
|
||||||
@ -207,8 +207,8 @@ class DungeonUI(UI):
|
|||||||
self.device.screenshot()
|
self.device.screenshot()
|
||||||
|
|
||||||
# End
|
# End
|
||||||
if self.appear(COMBAT_PREPARE) or self.appear(FORGOTTEN_HALL_CHECK):
|
if self.appear(enter_check_button):
|
||||||
logger.info('Arrive COMBAT_PREPARE')
|
logger.info(f'Arrive {enter_check_button.name}')
|
||||||
break
|
break
|
||||||
|
|
||||||
# Additional
|
# Additional
|
||||||
@ -279,7 +279,7 @@ class DungeonUI(UI):
|
|||||||
if dungeon.is_Forgotten_Hall:
|
if dungeon.is_Forgotten_Hall:
|
||||||
DUNGEON_NAV_LIST.select_row(KEYWORDS_DUNGEON_NAV.Forgotten_Hall, main=self)
|
DUNGEON_NAV_LIST.select_row(KEYWORDS_DUNGEON_NAV.Forgotten_Hall, main=self)
|
||||||
self._dungeon_insight(dungeon)
|
self._dungeon_insight(dungeon)
|
||||||
self._dungeon_enter(dungeon)
|
self._dungeon_enter(dungeon, enter_check_button=FORGOTTEN_HALL_CHECK)
|
||||||
return True
|
return True
|
||||||
|
|
||||||
logger.error(f'Goto dungeon {dungeon} is not supported')
|
logger.error(f'Goto dungeon {dungeon} is not supported')
|
||||||
|
Loading…
Reference in New Issue
Block a user