mirror of
https://github.com/LmeSzinc/StarRailCopilot.git
synced 2024-11-22 00:35:34 +00:00
Fix: limit_entrance has no effect on calyx crimson dungeons
This commit is contained in:
parent
87c322a21b
commit
ca39c06062
@ -118,6 +118,10 @@ class OcrDungeonListLimitEntrance(OcrDungeonList):
|
||||
self.button = ClickButton((*self.button.area[:3], self.button.area[3] - 70))
|
||||
|
||||
|
||||
class OcrDungeonListCalyxCrimsonLimitEntrance(OcrDungeonListCalyxCrimson, OcrDungeonListLimitEntrance):
|
||||
pass
|
||||
|
||||
|
||||
class DraggableDungeonNav(DraggableList):
|
||||
# 0.5 is the magic number to reach bottom in 1 swipe
|
||||
# but relax we still have retires when magic doesn't work
|
||||
@ -131,6 +135,8 @@ class DraggableDungeonList(DraggableList):
|
||||
# use_plane: True to use map planes to predict dungeons only.
|
||||
# Can only be True in Calyx Crimson
|
||||
use_plane = False
|
||||
# limit_entrance: True to ensure the teleport button is insight
|
||||
limit_entrance = False
|
||||
|
||||
def load_rows(self, main: ModuleBase, allow_early_access=False):
|
||||
"""
|
||||
@ -141,10 +147,16 @@ class DraggableDungeonList(DraggableList):
|
||||
relative_area = (0, 0, 1280, 120)
|
||||
if self.use_plane:
|
||||
self.keyword_class = [MapPlane, DungeonEntrance]
|
||||
self.ocr_class = OcrDungeonListCalyxCrimson
|
||||
if self.limit_entrance:
|
||||
self.ocr_class = OcrDungeonListCalyxCrimsonLimitEntrance
|
||||
else:
|
||||
self.ocr_class = OcrDungeonListCalyxCrimson
|
||||
else:
|
||||
self.keyword_class = [DungeonList, DungeonEntrance]
|
||||
self.ocr_class = OcrDungeonList
|
||||
if self.limit_entrance:
|
||||
self.ocr_class = OcrDungeonListLimitEntrance
|
||||
else:
|
||||
self.ocr_class = OcrDungeonList
|
||||
super().load_rows(main=main)
|
||||
|
||||
# Check early access dungeons
|
||||
@ -525,10 +537,10 @@ class DungeonUI(DungeonState):
|
||||
DUNGEON_LIST.drag_vector = (-0.4, -0.2) # Keyword loaded is reversed
|
||||
else:
|
||||
DUNGEON_LIST.drag_vector = (0.2, 0.4)
|
||||
DUNGEON_LIST.ocr_class = OcrDungeonListLimitEntrance
|
||||
DUNGEON_LIST.limit_entrance = True
|
||||
DUNGEON_LIST.insight_row(dungeon, main=self)
|
||||
DUNGEON_LIST.drag_vector = DraggableList.drag_vector
|
||||
DUNGEON_LIST.ocr_class = OcrDungeonList
|
||||
DUNGEON_LIST.limit_entrance = False
|
||||
DUNGEON_LIST.load_rows(main=self)
|
||||
# Check if dungeon unlocked
|
||||
for entrance in DUNGEON_LIST.navigates:
|
||||
|
Loading…
Reference in New Issue
Block a user