Fixed non-deterministic shop-sanity shuffling.

This commit is contained in:
CaitSith2
2021-01-28 22:39:04 -08:00
parent 8ddb1ab614
commit 9ee5c50f88

View File

@@ -458,7 +458,10 @@ class World(object):
for location in locations:
if location.can_reach(state):
sphere.add(location)
yield sphere
sphere_list = list(sphere)
sphere_list.sort(key=lambda location: location.name)
self.random.shuffle(sphere_list)
yield sphere_list
if not sphere:
if locations:
yield locations # unreachable locations