make "universal" small key shuffle a thing and split it out of retro

also make retro usable independently from the other world modes in mystery
This commit is contained in:
Fabian Dill
2020-08-20 20:13:00 +02:00
parent bea54d91de
commit 685ff49711
10 changed files with 101 additions and 53 deletions

View File

@@ -203,7 +203,13 @@ def fill_restrictive(world, base_state: CollectionState, locations, itempool, si
logging.warning(
f'Not all items placed. Game beatable anyway. (Could not place {item_to_place})')
continue
raise FillError(f'No more spots to place {item_to_place}, locations {locations} are invalid')
placements = []
for region in world.regions:
for location in region.locations:
if location.item and not location.event:
placements.append(location)
raise FillError(f'No more spots to place {item_to_place}, locations {locations} are invalid. '
f'\nAlready placed {len(placements)}: {", ".join(placements)}')
world.push_item(spot_to_fill, item_to_place, False)
locations.remove(spot_to_fill)