Lots of bugfixes - see notes

This commit is contained in:
aerinon
2020-11-09 13:54:03 -07:00
parent cdf5f23b75
commit 6162fddf47
11 changed files with 129 additions and 24 deletions

View File

@@ -40,6 +40,8 @@ def link_doors(world, player):
connect_two_way(world, entrance, ext, player)
for entrance, ext in straight_staircases:
connect_two_way(world, entrance, ext, player)
connect_custom(world, player)
find_inaccessible_regions(world, player)
@@ -197,6 +199,12 @@ def convert_key_doors(k_doors, world, player):
return result
def connect_custom(world, player):
if hasattr(world, 'custom_doors') and world.custom_doors[player]:
for entrance, ext in world.custom_doors[player]:
connect_two_way(world, entrance, ext, player)
def connect_simple_door(world, exit_name, region_name, player):
region = world.get_region(region_name, player)
world.get_entrance(exit_name, player).connect(region)