From 808daf224d8b5f4ee276d2b8b34dc2b19eb2c664 Mon Sep 17 00:00:00 2001 From: codemann8 Date: Wed, 3 Sep 2025 02:52:55 -0500 Subject: [PATCH] Fixed EG2 spawn starts to connect logic exits more consistently --- source/overworld/EntranceShuffle2.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/source/overworld/EntranceShuffle2.py b/source/overworld/EntranceShuffle2.py index d02e3362..777edaec 100644 --- a/source/overworld/EntranceShuffle2.py +++ b/source/overworld/EntranceShuffle2.py @@ -644,7 +644,6 @@ def do_dark_sanc(entrances, exits, avail): entrances.remove(choice) exits.remove('Dark Sanctuary Hint') connect_entrance(choice, 'Dark Sanctuary Hint', avail) - ext.connect(avail.world.get_entrance(choice, avail.player).parent_region) if not avail.coupled: avail.decoupled_entrances.remove(choice) if avail.swapped and choice != 'Dark Sanctuary Hint': @@ -652,8 +651,7 @@ def do_dark_sanc(entrances, exits, avail): entrances.remove(swap_ent) exits.remove(swap_ext) elif not ext.connected_region: - # default to output to vanilla area, assume vanilla connection - ext.connect(avail.world.get_region('Dark Chapel Area', avail.player)) + raise Exception('Dark Sanctuary Hint was placed earlier but its exit not properly connected') 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) else: 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) exits.remove(lh_exit) if not avail.coupled: @@ -1908,6 +1904,12 @@ def connect_entrance(entrancename, exit_name, avail): avail.entrances.remove(entrancename) if avail.coupled: 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) logging.getLogger('').debug(f'Connected (entr) {entrance.name} to {exit.name if exit is not None else region.name}')