Simplified tile swap check code

This commit is contained in:
codemann8
2021-12-29 18:16:46 -06:00
parent cf86aedb79
commit d41a5244ae
2 changed files with 2 additions and 2 deletions

View File

@@ -1535,7 +1535,7 @@ def connect_inaccessible_regions(world, lw_entrances, dw_entrances, caves, playe
for region_name in inaccessible_regions.copy():
region = world.get_region(region_name, player)
if region.type not in [RegionType.LightWorld, RegionType.DarkWorld] or not any((not exit.connected_region and exit.spot_type == 'Entrance') for exit in region.exits) \
or (region_name == 'Pyramid Exit Ledge' and world.shuffle[player] != 'insanity' or world.is_tile_swapped(0x1b, player):
or (region_name == 'Pyramid Exit Ledge' and world.shuffle[player] != 'insanity' or world.is_tile_swapped(0x1b, player)):
inaccessible_regions.remove(region_name)
elif region.type == (RegionType.LightWorld if not invFlag else RegionType.DarkWorld):
must_exit_regions.append(region_name)