If due to DR or Plando the world is not fulfilling access rules, default to can_beat_game for Shop Logic
This commit is contained in:
parent
082a7b7e41
commit
d214783932
9
Main.py
9
Main.py
|
@ -229,6 +229,13 @@ def main(args, seed=None):
|
||||||
|
|
||||||
world.random.shuffle(candidates)
|
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
|
# 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
|
# 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)
|
swap_location_item(c, location, check_locked=False)
|
||||||
candidates.remove(c)
|
candidates.remove(c)
|
||||||
if not world.fulfills_accessibility():
|
if not shuffle_condition():
|
||||||
swap_location_item(c, location, check_locked=False)
|
swap_location_item(c, location, check_locked=False)
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue