From 990a466253fc5f2913c05cb563051bb90ff44527 Mon Sep 17 00:00:00 2001 From: AmazingAmpharos Date: Thu, 9 Nov 2017 04:46:59 -0600 Subject: [PATCH] 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. --- Fill.py | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/Fill.py b/Fill.py index 70ffea92..351c7d8d 100644 --- a/Fill.py +++ b/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] # fill in gtower locations with trash first - gtower_locations = [location for location in fill_locations if 'Ganons Tower' in location.name] - random.shuffle(gtower_locations) - trashcnt = 0 - while gtower_locations and restitempool and trashcnt < gftower_trash_count: - spot_to_fill = gtower_locations.pop() - item_to_place = restitempool.pop() - world.push_item(spot_to_fill, item_to_place, False) - fill_locations.remove(spot_to_fill) - trashcnt += 1 + if not world.shuffle_ganon: + gtower_locations = [location for location in fill_locations if 'Ganons Tower' in location.name] + random.shuffle(gtower_locations) + trashcnt = 0 + while gtower_locations and restitempool and trashcnt < gftower_trash_count: + spot_to_fill = gtower_locations.pop() + item_to_place = restitempool.pop() + world.push_item(spot_to_fill, item_to_place, False) + fill_locations.remove(spot_to_fill) + trashcnt += 1 random.shuffle(fill_locations) fill_locations.reverse()