Merge branch 'main' into multishop
This commit is contained in:
commit
082a7b7e41
7
Fill.py
7
Fill.py
|
@ -20,6 +20,7 @@ def fill_restrictive(world, base_state: CollectionState, locations, itempool, si
|
||||||
return new_state
|
return new_state
|
||||||
|
|
||||||
unplaced_items = []
|
unplaced_items = []
|
||||||
|
placements = []
|
||||||
|
|
||||||
no_access_checks = {}
|
no_access_checks = {}
|
||||||
reachable_items = {}
|
reachable_items = {}
|
||||||
|
@ -53,11 +54,6 @@ def fill_restrictive(world, base_state: CollectionState, locations, itempool, si
|
||||||
logging.warning(
|
logging.warning(
|
||||||
f'Not all items placed. Game beatable anyway. (Could not place {item_to_place})')
|
f'Not all items placed. Game beatable anyway. (Could not place {item_to_place})')
|
||||||
continue
|
continue
|
||||||
placements = []
|
|
||||||
for region in world.regions:
|
|
||||||
for location in region.locations:
|
|
||||||
if location.item and not location.event:
|
|
||||||
placements.append(location)
|
|
||||||
# fill in name of world for item
|
# fill in name of world for item
|
||||||
item_to_place.world = world
|
item_to_place.world = world
|
||||||
raise FillError(f'No more spots to place {item_to_place}, locations {locations} are invalid. '
|
raise FillError(f'No more spots to place {item_to_place}, locations {locations} are invalid. '
|
||||||
|
@ -67,6 +63,7 @@ def fill_restrictive(world, base_state: CollectionState, locations, itempool, si
|
||||||
if lock:
|
if lock:
|
||||||
spot_to_fill.locked = True
|
spot_to_fill.locked = True
|
||||||
locations.remove(spot_to_fill)
|
locations.remove(spot_to_fill)
|
||||||
|
placements.append(spot_to_fill)
|
||||||
spot_to_fill.event = True
|
spot_to_fill.event = True
|
||||||
|
|
||||||
itempool.extend(unplaced_items)
|
itempool.extend(unplaced_items)
|
||||||
|
|
Loading…
Reference in New Issue