mirror of
https://github.com/MarioSpore/Grinch-AP.git
synced 2025-10-21 20:21:32 -06:00
Fix bugs that prevent seed rolling from continuing if too many plando items are placed.
This commit is contained in:
4
Fill.py
4
Fill.py
@@ -144,6 +144,8 @@ def distribute_items_restrictive(world, gftower_trash=False, fill_locations=None
|
|||||||
localrestitempool.values()): # we need to make sure some fills are limited to certain worlds
|
localrestitempool.values()): # we need to make sure some fills are limited to certain worlds
|
||||||
for player, items in localprioitempool.items(): # items already shuffled
|
for player, items in localprioitempool.items(): # items already shuffled
|
||||||
local_locations = [location for location in fill_locations if location.player == player]
|
local_locations = [location for location in fill_locations if location.player == player]
|
||||||
|
if not local_locations:
|
||||||
|
continue
|
||||||
world.random.shuffle(local_locations)
|
world.random.shuffle(local_locations)
|
||||||
for item_to_place in items:
|
for item_to_place in items:
|
||||||
spot_to_fill = local_locations.pop()
|
spot_to_fill = local_locations.pop()
|
||||||
@@ -151,6 +153,8 @@ def distribute_items_restrictive(world, gftower_trash=False, fill_locations=None
|
|||||||
fill_locations.remove(spot_to_fill)
|
fill_locations.remove(spot_to_fill)
|
||||||
for player, items in localrestitempool.items(): # items already shuffled
|
for player, items in localrestitempool.items(): # items already shuffled
|
||||||
local_locations = [location for location in fill_locations if location.player == player]
|
local_locations = [location for location in fill_locations if location.player == player]
|
||||||
|
if not local_locations:
|
||||||
|
continue
|
||||||
world.random.shuffle(local_locations)
|
world.random.shuffle(local_locations)
|
||||||
for item_to_place in items:
|
for item_to_place in items:
|
||||||
spot_to_fill = local_locations.pop()
|
spot_to_fill = local_locations.pop()
|
||||||
|
2
Rom.py
2
Rom.py
@@ -2066,7 +2066,7 @@ def write_strings(rom, world, player, team):
|
|||||||
items_to_hint.extend(BigKeys)
|
items_to_hint.extend(BigKeys)
|
||||||
local_random.shuffle(items_to_hint)
|
local_random.shuffle(items_to_hint)
|
||||||
hint_count = 5 if world.shuffle[player] not in ['vanilla', 'dungeonssimple', 'dungeonsfull'] else 8
|
hint_count = 5 if world.shuffle[player] not in ['vanilla', 'dungeonssimple', 'dungeonsfull'] else 8
|
||||||
while hint_count > 0:
|
while hint_count > 0 and items_to_hint:
|
||||||
this_item = items_to_hint.pop(0)
|
this_item = items_to_hint.pop(0)
|
||||||
this_location = world.find_items(this_item, player)
|
this_location = world.find_items(this_item, player)
|
||||||
local_random.shuffle(this_location)
|
local_random.shuffle(this_location)
|
||||||
|
Reference in New Issue
Block a user