@@ -70,7 +70,7 @@ def create_regions_and_locations(world: MultiWorld, player: int, precalculated_w
70
70
logic = TimespinnerLogic (world , player , precalculated_weights )
71
71
72
72
connect (world , player , 'Lake desolation' , 'Lower lake desolation' , lambda state : flooded .flood_lake_desolation or logic .has_timestop (state ) or state .has ('Talaria Attachment' , player ))
73
- connect (world , player , 'Lake desolation' , 'Upper lake desolation' , lambda state : logic .has_fire (state ) and state .can_reach ('Upper Lake Serene' , 'Region' , player ))
73
+ connect (world , player , 'Lake desolation' , 'Upper lake desolation' , lambda state : logic .has_fire (state ) and state .can_reach ('Upper Lake Serene' , 'Region' , player ), "Upper Lake Serene" )
74
74
connect (world , player , 'Lake desolation' , 'Skeleton Shaft' , lambda state : flooded .flood_lake_desolation or logic .has_doublejump (state ))
75
75
connect (world , player , 'Lake desolation' , 'Space time continuum' , logic .has_teleport )
76
76
connect (world , player , 'Upper lake desolation' , 'Lake desolation' )
@@ -80,7 +80,7 @@ def create_regions_and_locations(world: MultiWorld, player: int, precalculated_w
80
80
connect (world , player , 'Eastern lake desolation' , 'Space time continuum' , logic .has_teleport )
81
81
connect (world , player , 'Eastern lake desolation' , 'Library' )
82
82
connect (world , player , 'Eastern lake desolation' , 'Lower lake desolation' )
83
- connect (world , player , 'Eastern lake desolation' , 'Upper lake desolation' , lambda state : logic .has_fire (state ) and state .can_reach ('Upper Lake Serene' , 'Region' , player ))
83
+ connect (world , player , 'Eastern lake desolation' , 'Upper lake desolation' , lambda state : logic .has_fire (state ) and state .can_reach ('Upper Lake Serene' , 'Region' , player ), "Upper Lake Serene" )
84
84
connect (world , player , 'Library' , 'Eastern lake desolation' )
85
85
connect (world , player , 'Library' , 'Library top' , lambda state : logic .has_doublejump (state ) or state .has ('Talaria Attachment' , player ))
86
86
connect (world , player , 'Library' , 'Varndagroth tower left' , logic .has_keycard_D )
@@ -185,7 +185,7 @@ def create_regions_and_locations(world: MultiWorld, player: int, precalculated_w
185
185
if is_option_enabled (world , player , "GyreArchives" ):
186
186
connect (world , player , 'The lab (upper)' , 'Ravenlord\' s Lair' , lambda state : state .has ('Merchant Crow' , player ))
187
187
connect (world , player , 'Ravenlord\' s Lair' , 'The lab (upper)' )
188
- connect (world , player , 'Library top' , 'Ifrit\' s Lair' , lambda state : state .has ('Kobo' , player ) and state .can_reach ('Refugee Camp' , 'Region' , player ))
188
+ connect (world , player , 'Library top' , 'Ifrit\' s Lair' , lambda state : state .has ('Kobo' , player ) and state .can_reach ('Refugee Camp' , 'Region' , player ), "Refugee Camp" )
189
189
connect (world , player , 'Ifrit\' s Lair' , 'Library top' )
190
190
191
191
@@ -242,11 +242,19 @@ def connectStartingRegion(world: MultiWorld, player: int):
242
242
243
243
244
244
def connect (world : MultiWorld , player : int , source : str , target : str ,
245
- rule : Optional [Callable [[CollectionState ], bool ]] = None ):
245
+ rule : Optional [Callable [[CollectionState ], bool ]] = None ,
246
+ indirect : str = "" ):
246
247
247
248
sourceRegion = world .get_region (source , player )
248
249
targetRegion = world .get_region (target , player )
249
- sourceRegion .connect (targetRegion , rule = rule )
250
+ entrance = sourceRegion .connect (targetRegion , rule = rule )
251
+
252
+ if indirect :
253
+ indirectRegion = world .get_region (indirect , player )
254
+ if indirectRegion in world .indirect_connections :
255
+ world .indirect_connections [indirectRegion ].add (entrance )
256
+ else :
257
+ world .indirect_connections [indirectRegion ] = {entrance }
250
258
251
259
252
260
def split_location_datas_per_region (locations : List [LocationData ]) -> Dict [str , List [LocationData ]]:
0 commit comments