Add: dungeon_goto Ornament_Extraction

This commit is contained in:
LmeSzinc 2024-07-01 00:38:37 +08:00
parent f478058cb9
commit b1ef9d0786
4 changed files with 95 additions and 74 deletions

View File

@ -91,6 +91,8 @@ class GenerateDungeonList(GenerateKeyword):
def iter_rows(self) -> t.Iterable[dict]: def iter_rows(self) -> t.Iterable[dict]:
dungeons = list(super().iter_rows()) dungeons = list(super().iter_rows())
# Sort by path
calyx = [] calyx = []
order = [ order = [
'Calyx_Golden', 'Calyx_Golden',
@ -108,9 +110,20 @@ class GenerateDungeonList(GenerateKeyword):
dungeons = [d for d in dungeons if not condition(d)] dungeons = [d for d in dungeons if not condition(d)]
dungeons = calyx + dungeons dungeons = calyx + dungeons
# Reverse Divergent_Universe
start = 0
end = 0
for index, dungeon in enumerate(dungeons):
if dungeon['name'].startswith('Divergent_Universe'):
if start == 0:
start = index
end = index + 1
if start > 0 and end > 0:
dungeons = dungeons[:start] + dungeons[start:end][::-1] + dungeons[end:]
# Re-sort ID
self.keyword_index = 0 self.keyword_index = 0
for row in dungeons: for row in dungeons:
# Re-sort ID
self.keyword_index += 1 self.keyword_index += 1
row['id'] = self.keyword_index row['id'] = self.keyword_index
yield row yield row

View File

@ -117,6 +117,11 @@ class DungeonList(Keyword):
def is_Simulated_Universe(self): def is_Simulated_Universe(self):
return 'Simulated_Universe' in self.name return 'Simulated_Universe' in self.name
@cached_property
def is_Ornament_Extraction(self):
# Farm Ornament_Extraction from Ornament_Extraction_xxx
return 'Divergent_Universe' in self.name
@cached_property @cached_property
def is_Forgotten_Hall(self): def is_Forgotten_Hall(self):
for word in [ for word in [
@ -151,6 +156,8 @@ class DungeonList(Keyword):
import tasks.dungeon.keywords.nav as KEYWORDS_DUNGEON_NAV import tasks.dungeon.keywords.nav as KEYWORDS_DUNGEON_NAV
if self.is_Simulated_Universe: if self.is_Simulated_Universe:
return KEYWORDS_DUNGEON_NAV.Simulated_Universe return KEYWORDS_DUNGEON_NAV.Simulated_Universe
if self.is_Ornament_Extraction:
return KEYWORDS_DUNGEON_NAV.Ornament_Extraction
if self.is_Calyx_Golden: if self.is_Calyx_Golden:
return KEYWORDS_DUNGEON_NAV.Calyx_Golden return KEYWORDS_DUNGEON_NAV.Calyx_Golden
if self.is_Calyx_Crimson: if self.is_Calyx_Crimson:

View File

@ -707,74 +707,19 @@ Simulated_Universe_World_9 = DungeonList(
dungeon_id=190, dungeon_id=190,
plane_id=100000104, plane_id=100000104,
) )
Divergent_Universe_Untoppled_Walls = DungeonList( Divergent_Universe_Eternal_Comedy = DungeonList(
id=65, id=65,
name='Divergent_Universe_Untoppled_Walls', name='Divergent_Universe_Eternal_Comedy',
cn='坚城不倒•差分宇宙', cn='永恒笑剧•差分宇宙',
cht='堅城不倒•差分宇宙', cht='永恆笑劇•差分宇宙',
en='Divergent Universe: Untoppled Walls', en='Divergent Universe: Eternal Comedy',
jp='階差宇宙・不動の砦', jp='階差宇宙・永遠の喜劇',
es='Muros inquebrantables: Universo Diferenciado', es='Universo Diferenciado: Comedia eterna',
dungeon_id=230, dungeon_id=300,
plane_id=0,
)
Divergent_Universe_Smelted_Heart = DungeonList(
id=66,
name='Divergent_Universe_Smelted_Heart',
cn='浴火钢心•差分宇宙',
cht='浴火鋼心•差分宇宙',
en='Divergent Universe: Smelted Heart',
jp='階差宇宙・鋼の意志',
es='Corazón de fundición: Universo Diferenciado',
dungeon_id=240,
plane_id=0,
)
Divergent_Universe_Gentle_Words = DungeonList(
id=67,
name='Divergent_Universe_Gentle_Words',
cn='温柔话语•差分宇宙',
cht='溫柔話語•差分宇宙',
en='Divergent Universe: Gentle Words',
jp='階差宇宙・優しい言葉',
es='Palabras amables: Universo Diferenciado',
dungeon_id=250,
plane_id=0,
)
Divergent_Universe_Permafrost = DungeonList(
id=68,
name='Divergent_Universe_Permafrost',
cn='百年冻土•差分宇宙',
cht='百年凍土•差分宇宙',
en='Divergent Universe: Permafrost',
jp='階差宇宙・永久凍土',
es='Permafrost: Universo Diferenciado',
dungeon_id=260,
plane_id=0,
)
Divergent_Universe_Fruit_of_Evil = DungeonList(
id=69,
name='Divergent_Universe_Fruit_of_Evil',
cn='孽果盘生•差分宇宙',
cht='孽果盤生•差分宇宙',
en='Divergent Universe: Fruit of Evil',
jp='階差宇宙・渦巻く罪',
es='Fruta del desastre: Universo Diferenciado',
dungeon_id=270,
plane_id=0,
)
Divergent_Universe_Pouring_Blades = DungeonList(
id=70,
name='Divergent_Universe_Pouring_Blades',
cn='天剑如雨•差分宇宙',
cht='天劍如雨•差分宇宙',
en='Divergent Universe: Pouring Blades',
jp='階差宇宙・剣の雨',
es='Lluvia de espadas: Universo Diferenciado',
dungeon_id=280,
plane_id=0, plane_id=0,
) )
Divergent_Universe_To_Sweet_Dreams = DungeonList( Divergent_Universe_To_Sweet_Dreams = DungeonList(
id=71, id=66,
name='Divergent_Universe_To_Sweet_Dreams', name='Divergent_Universe_To_Sweet_Dreams',
cn='伴你入眠•差分宇宙', cn='伴你入眠•差分宇宙',
cht='伴你入眠•差分宇宙', cht='伴你入眠•差分宇宙',
@ -784,15 +729,70 @@ Divergent_Universe_To_Sweet_Dreams = DungeonList(
dungeon_id=290, dungeon_id=290,
plane_id=0, plane_id=0,
) )
Divergent_Universe_Eternal_Comedy = DungeonList( Divergent_Universe_Pouring_Blades = DungeonList(
id=67,
name='Divergent_Universe_Pouring_Blades',
cn='天剑如雨•差分宇宙',
cht='天劍如雨•差分宇宙',
en='Divergent Universe: Pouring Blades',
jp='階差宇宙・剣の雨',
es='Lluvia de espadas: Universo Diferenciado',
dungeon_id=280,
plane_id=0,
)
Divergent_Universe_Fruit_of_Evil = DungeonList(
id=68,
name='Divergent_Universe_Fruit_of_Evil',
cn='孽果盘生•差分宇宙',
cht='孽果盤生•差分宇宙',
en='Divergent Universe: Fruit of Evil',
jp='階差宇宙・渦巻く罪',
es='Fruta del desastre: Universo Diferenciado',
dungeon_id=270,
plane_id=0,
)
Divergent_Universe_Permafrost = DungeonList(
id=69,
name='Divergent_Universe_Permafrost',
cn='百年冻土•差分宇宙',
cht='百年凍土•差分宇宙',
en='Divergent Universe: Permafrost',
jp='階差宇宙・永久凍土',
es='Permafrost: Universo Diferenciado',
dungeon_id=260,
plane_id=0,
)
Divergent_Universe_Gentle_Words = DungeonList(
id=70,
name='Divergent_Universe_Gentle_Words',
cn='温柔话语•差分宇宙',
cht='溫柔話語•差分宇宙',
en='Divergent Universe: Gentle Words',
jp='階差宇宙・優しい言葉',
es='Palabras amables: Universo Diferenciado',
dungeon_id=250,
plane_id=0,
)
Divergent_Universe_Smelted_Heart = DungeonList(
id=71,
name='Divergent_Universe_Smelted_Heart',
cn='浴火钢心•差分宇宙',
cht='浴火鋼心•差分宇宙',
en='Divergent Universe: Smelted Heart',
jp='階差宇宙・鋼の意志',
es='Corazón de fundición: Universo Diferenciado',
dungeon_id=240,
plane_id=0,
)
Divergent_Universe_Untoppled_Walls = DungeonList(
id=72, id=72,
name='Divergent_Universe_Eternal_Comedy', name='Divergent_Universe_Untoppled_Walls',
cn='永恒笑剧•差分宇宙', cn='坚城不倒•差分宇宙',
cht='永恆笑劇•差分宇宙', cht='堅城不倒•差分宇宙',
en='Divergent Universe: Eternal Comedy', en='Divergent Universe: Untoppled Walls',
jp='階差宇宙・永遠の喜劇', jp='階差宇宙・不動の砦',
es='Universo Diferenciado: Comedia eterna', es='Muros inquebrantables: Universo Diferenciado',
dungeon_id=300, dungeon_id=230,
plane_id=0, plane_id=0,
) )
Simulated_Universe_The_Swarm_Disaster = DungeonList( Simulated_Universe_The_Swarm_Disaster = DungeonList(

View File

@ -732,7 +732,8 @@ class DungeonUI(DungeonState):
if dungeon.is_Calyx_Crimson \ if dungeon.is_Calyx_Crimson \
or dungeon.is_Stagnant_Shadow \ or dungeon.is_Stagnant_Shadow \
or dungeon.is_Cavern_of_Corrosion \ or dungeon.is_Cavern_of_Corrosion \
or dungeon.is_Echo_of_War: or dungeon.is_Echo_of_War \
or dungeon.is_Ornament_Extraction:
self._dungeon_nav_goto(dungeon.dungeon_nav) self._dungeon_nav_goto(dungeon.dungeon_nav)
self._dungeon_wait_until_dungeon_list_loaded() self._dungeon_wait_until_dungeon_list_loaded()
self._dungeon_insight(dungeon) self._dungeon_insight(dungeon)