mirror of
https://github.com/MarioSpore/Grinch-AP.git
synced 2025-10-21 20:21:32 -06:00
safer failure in case of no more candidate swaps
This commit is contained in:
4
Main.py
4
Main.py
@@ -238,8 +238,10 @@ def main(args, seed=None):
|
|||||||
candidates.remove(c)
|
candidates.remove(c)
|
||||||
break
|
break
|
||||||
else:
|
else:
|
||||||
|
# This *should* never happen. But let's fail safely just in case.
|
||||||
logging.warning("Ran out of ShopShuffle Item candidate locations.")
|
logging.warning("Ran out of ShopShuffle Item candidate locations.")
|
||||||
break # we ran out of candidates
|
shop.region.locations.remove(location)
|
||||||
|
continue
|
||||||
|
|
||||||
# update table to location data
|
# update table to location data
|
||||||
item_name = location.item.name
|
item_name = location.item.name
|
||||||
|
Reference in New Issue
Block a user