From 3150e0f16173fe27e04a3ece11158e7f47f9b4bb Mon Sep 17 00:00:00 2001 From: compiling <8335770+compiling@users.noreply.github.com> Date: Sun, 26 Jan 2020 18:16:00 +1100 Subject: [PATCH] No-Logic fix - don't try to spread crystal access if the current state is nothing --- BaseClasses.py | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/BaseClasses.py b/BaseClasses.py index 7035b2ac..358227f5 100644 --- a/BaseClasses.py +++ b/BaseClasses.py @@ -450,17 +450,17 @@ class CollectionState(object): blocked.add(entrance.parent_region) if color_type: ccr[candidate] = color_type - for ext in candidate.exits: - connect = ext.connected_region - if connect in rrp and connect in ccr: - door = self.world.check_for_door(ext.name, player) - if door is not None and not door.blocked: - if ext.can_reach(self): - new_color = ccr[connect] | (ccr[candidate] & (door.crystal or CrystalBarrier.Either)) - if new_color != ccr[connect]: - self.spread_crystal_access(candidate, new_color, rrp, ccr, player) - else: - blocked.add(candidate) + for ext in candidate.exits: + connect = ext.connected_region + if connect in rrp and connect in ccr: + door = self.world.check_for_door(ext.name, player) + if door is not None and not door.blocked: + if ext.can_reach(self): + new_color = ccr[connect] | (ccr[candidate] & (door.crystal or CrystalBarrier.Either)) + if new_color != ccr[connect]: + self.spread_crystal_access(candidate, new_color, rrp, ccr, player) + else: + blocked.add(candidate) new_regions = len(rrp) > reachable_regions_count reachable_regions_count = len(rrp)