No filler in shuffled GT
This adds a check to adding filler into GT for the shuffle_ganon flag. If it is set, adding filler is skipped.
This commit is contained in:
parent
3d60d3ab50
commit
990a466253
19
Fill.py
19
Fill.py
|
@ -204,15 +204,16 @@ def distribute_items_restrictive(world, gftower_trash_count=0, fill_locations=No
|
||||||
restitempool = [item for item in world.itempool if not item.advancement and not item.priority]
|
restitempool = [item for item in world.itempool if not item.advancement and not item.priority]
|
||||||
|
|
||||||
# fill in gtower locations with trash first
|
# fill in gtower locations with trash first
|
||||||
gtower_locations = [location for location in fill_locations if 'Ganons Tower' in location.name]
|
if not world.shuffle_ganon:
|
||||||
random.shuffle(gtower_locations)
|
gtower_locations = [location for location in fill_locations if 'Ganons Tower' in location.name]
|
||||||
trashcnt = 0
|
random.shuffle(gtower_locations)
|
||||||
while gtower_locations and restitempool and trashcnt < gftower_trash_count:
|
trashcnt = 0
|
||||||
spot_to_fill = gtower_locations.pop()
|
while gtower_locations and restitempool and trashcnt < gftower_trash_count:
|
||||||
item_to_place = restitempool.pop()
|
spot_to_fill = gtower_locations.pop()
|
||||||
world.push_item(spot_to_fill, item_to_place, False)
|
item_to_place = restitempool.pop()
|
||||||
fill_locations.remove(spot_to_fill)
|
world.push_item(spot_to_fill, item_to_place, False)
|
||||||
trashcnt += 1
|
fill_locations.remove(spot_to_fill)
|
||||||
|
trashcnt += 1
|
||||||
|
|
||||||
random.shuffle(fill_locations)
|
random.shuffle(fill_locations)
|
||||||
fill_locations.reverse()
|
fill_locations.reverse()
|
||||||
|
|
Loading…
Reference in New Issue