mirror of
https://github.com/LmeSzinc/StarRailCopilot.git
synced 2024-11-25 10:01:10 +00:00
Opt: Faster goto_rogue()
This commit is contained in:
parent
6acd64a1f4
commit
f05e965aac
@ -422,6 +422,26 @@ class DungeonUI(DungeonState):
|
|||||||
logger.attr('DungeonInteract', None)
|
logger.attr('DungeonInteract', None)
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
def dungeon_goto_rogue(self):
|
||||||
|
"""
|
||||||
|
Goto Simulated Universe page but not pressing the TELEPORT button
|
||||||
|
|
||||||
|
Pages:
|
||||||
|
in: Any
|
||||||
|
out: page_guide, Survival_Index, Simulated_Universe
|
||||||
|
|
||||||
|
Examples:
|
||||||
|
self = DungeonUI('src')
|
||||||
|
self.device.screenshot()
|
||||||
|
self.dungeon_goto_rogue()
|
||||||
|
self._rogue_teleport()
|
||||||
|
"""
|
||||||
|
self.dungeon_tab_goto(KEYWORDS_DUNGEON_TAB.Survival_Index)
|
||||||
|
if self.appear(SURVIVAL_INDEX_LOADED):
|
||||||
|
logger.info('Already at nav Simulated_Universe')
|
||||||
|
else:
|
||||||
|
self._dungeon_nav_goto(KEYWORDS_DUNGEON_LIST.Simulated_Universe_World_1)
|
||||||
|
|
||||||
def dungeon_goto(self, dungeon: DungeonList):
|
def dungeon_goto(self, dungeon: DungeonList):
|
||||||
"""
|
"""
|
||||||
Returns:
|
Returns:
|
||||||
|
@ -10,7 +10,6 @@ from tasks.base.assets.assets_base_page import MAP_EXIT
|
|||||||
from tasks.base.page import page_guide, page_main, page_rogue
|
from tasks.base.page import page_guide, page_main, page_rogue
|
||||||
from tasks.dungeon.keywords import DungeonList
|
from tasks.dungeon.keywords import DungeonList
|
||||||
from tasks.dungeon.keywords.dungeon import Simulated_Universe_World_1
|
from tasks.dungeon.keywords.dungeon import Simulated_Universe_World_1
|
||||||
from tasks.dungeon.keywords.tab import Survival_Index
|
|
||||||
from tasks.dungeon.state import OcrSimUniPoint
|
from tasks.dungeon.state import OcrSimUniPoint
|
||||||
from tasks.dungeon.ui import DungeonUI
|
from tasks.dungeon.ui import DungeonUI
|
||||||
from tasks.forgotten_hall.assets.assets_forgotten_hall_ui import TELEPORT
|
from tasks.forgotten_hall.assets.assets_forgotten_hall_ui import TELEPORT
|
||||||
@ -236,16 +235,6 @@ class RogueEntry(RouteBase, RogueRewardHandler, RoguePathHandler, DungeonUI):
|
|||||||
|
|
||||||
self.interval_clear(page_guide.check_button)
|
self.interval_clear(page_guide.check_button)
|
||||||
|
|
||||||
def goto_rogue(self):
|
|
||||||
"""
|
|
||||||
Pages:
|
|
||||||
in: Any
|
|
||||||
out: page_rogue, is_page_rogue_main()
|
|
||||||
"""
|
|
||||||
self.dungeon_tab_goto(Survival_Index)
|
|
||||||
self._dungeon_nav_goto(Simulated_Universe_World_1)
|
|
||||||
self._rogue_teleport()
|
|
||||||
|
|
||||||
def check_stop_condition(self):
|
def check_stop_condition(self):
|
||||||
"""
|
"""
|
||||||
Raises:
|
Raises:
|
||||||
@ -336,7 +325,8 @@ class RogueEntry(RouteBase, RogueRewardHandler, RoguePathHandler, DungeonUI):
|
|||||||
self.combat_enter_from_map()
|
self.combat_enter_from_map()
|
||||||
# Not in page_rogue, goto
|
# Not in page_rogue, goto
|
||||||
if not is_rogue_entry():
|
if not is_rogue_entry():
|
||||||
self.goto_rogue()
|
self.dungeon_goto_rogue()
|
||||||
|
self._rogue_teleport()
|
||||||
|
|
||||||
# Update rogue points
|
# Update rogue points
|
||||||
if datetime.now() - self.config.stored.SimulatedUniverse.time > timedelta(minutes=2):
|
if datetime.now() - self.config.stored.SimulatedUniverse.time > timedelta(minutes=2):
|
||||||
|
Loading…
Reference in New Issue
Block a user