Fixed EG2 spawn starts to connect logic exits more consistently

This commit is contained in:
codemann8
2025-09-03 02:52:55 -05:00
parent 95ec5c7983
commit 808daf224d

View File

@@ -644,7 +644,6 @@ def do_dark_sanc(entrances, exits, avail):
entrances.remove(choice) entrances.remove(choice)
exits.remove('Dark Sanctuary Hint') exits.remove('Dark Sanctuary Hint')
connect_entrance(choice, 'Dark Sanctuary Hint', avail) connect_entrance(choice, 'Dark Sanctuary Hint', avail)
ext.connect(avail.world.get_entrance(choice, avail.player).parent_region)
if not avail.coupled: if not avail.coupled:
avail.decoupled_entrances.remove(choice) avail.decoupled_entrances.remove(choice)
if avail.swapped and choice != 'Dark Sanctuary Hint': if avail.swapped and choice != 'Dark Sanctuary Hint':
@@ -652,8 +651,7 @@ def do_dark_sanc(entrances, exits, avail):
entrances.remove(swap_ent) entrances.remove(swap_ent)
exits.remove(swap_ext) exits.remove(swap_ext)
elif not ext.connected_region: elif not ext.connected_region:
# default to output to vanilla area, assume vanilla connection raise Exception('Dark Sanctuary Hint was placed earlier but its exit not properly connected')
ext.connect(avail.world.get_region('Dark Chapel Area', avail.player))
def do_links_house(entrances, exits, avail, cross_world): def do_links_house(entrances, exits, avail, cross_world):
@@ -723,8 +721,6 @@ def do_links_house(entrances, exits, avail, cross_world):
connect_two_way(links_house, lh_exit, avail) connect_two_way(links_house, lh_exit, avail)
else: else:
connect_entrance(links_house, lh_exit, avail) connect_entrance(links_house, lh_exit, avail)
ext = avail.world.get_entrance('Big Bomb Shop Exit', avail.player)
ext.connect(avail.world.get_entrance(links_house, avail.player).parent_region)
entrances.remove(links_house) entrances.remove(links_house)
exits.remove(lh_exit) exits.remove(lh_exit)
if not avail.coupled: if not avail.coupled:
@@ -1908,6 +1904,12 @@ def connect_entrance(entrancename, exit_name, avail):
avail.entrances.remove(entrancename) avail.entrances.remove(entrancename)
if avail.coupled: if avail.coupled:
avail.exits.remove(exit_name) avail.exits.remove(exit_name)
if exit_name == 'Big Bomb Shop' and avail.world.is_bombshop_start(avail.player):
ext = avail.world.get_entrance('Big Bomb Shop Exit', avail.player)
ext.connect(avail.world.get_entrance(entrancename, avail.player).parent_region)
if exit_name == 'Dark Sanctuary Hint' and avail.world.is_dark_chapel_start(avail.player):
ext = avail.world.get_entrance('Dark Sanctuary Hint Exit', avail.player)
ext.connect(avail.world.get_entrance(entrancename, avail.player).parent_region)
world.spoiler.set_entrance(entrance.name, exit.name if exit is not None else region.name, 'entrance', player) world.spoiler.set_entrance(entrance.name, exit.name if exit is not None else region.name, 'entrance', player)
logging.getLogger('').debug(f'Connected (entr) {entrance.name} to {exit.name if exit is not None else region.name}') logging.getLogger('').debug(f'Connected (entr) {entrance.name} to {exit.name if exit is not None else region.name}')