From d2147839322a06431fb7452c09b00404a4944c06 Mon Sep 17 00:00:00 2001 From: Fabian Dill Date: Thu, 14 Jan 2021 00:26:49 +0100 Subject: [PATCH] If due to DR or Plando the world is not fulfilling access rules, default to can_beat_game for Shop Logic --- Main.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Main.py b/Main.py index 2ffd86c2..a79f46fe 100644 --- a/Main.py +++ b/Main.py @@ -229,6 +229,13 @@ def main(args, seed=None): world.random.shuffle(candidates) + if not world.fulfills_accessibility(): + logger.warning("World does not fulfill accessibility rules as is, " + "only using \"beatable only\" for shop logic.") + shuffle_condition = world.can_beat_game + else: + shuffle_condition = world.fulfills_accessibility + # currently special care needs to be taken so that Shop.region.locations.item is identical to Shop.inventory # Potentially create Locations as needed and make inventory the only source, to prevent divergence @@ -241,7 +248,7 @@ def main(args, seed=None): swap_location_item(c, location, check_locked=False) candidates.remove(c) - if not world.fulfills_accessibility(): + if not shuffle_condition(): swap_location_item(c, location, check_locked=False) continue