From 246006d3949a69f96689793889da825cdf031155 Mon Sep 17 00:00:00 2001 From: codemann8 Date: Mon, 31 Oct 2022 14:10:03 -0500 Subject: [PATCH] Merged light/dark world marking --- Regions.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Regions.py b/Regions.py index e9755a8c..d568497c 100644 --- a/Regions.py +++ b/Regions.py @@ -1079,14 +1079,6 @@ def _create_region(player, name, type, hint='Hyrule', locations=None, exits=None def mark_light_dark_world_regions(world, player): # cross world caves may have some sections marked as both in_light_world, and in_dark_work. # That is ok. the bunny logic will check for this case and incorporate special rules. - # Note: I don't see why the order would matter, but the original Inverted code reversed the order - if world.mode[player] != 'inverted': - mark_light() - mark_dark() - else: - mark_dark() - mark_light() - def mark_light(): queue = collections.deque(region for region in world.get_regions(player) if region.type == RegionType.LightWorld) seen = set(queue) @@ -1116,6 +1108,14 @@ def mark_light_dark_world_regions(world, player): seen.add(exit.connected_region) queue.append(exit.connected_region) + # Note: I don't see why the order would matter, but the original Inverted code reversed the order + if world.mode[player] != 'inverted': + mark_light() + mark_dark() + else: + mark_dark() + mark_light() + def create_shops(world, player): world.shops[player] = []