From 9ee5c50f8898c355da0d8b11c2a8ba3a9c4ddd7d Mon Sep 17 00:00:00 2001 From: CaitSith2 Date: Thu, 28 Jan 2021 22:39:04 -0800 Subject: [PATCH] Fixed non-deterministic shop-sanity shuffling. --- BaseClasses.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/BaseClasses.py b/BaseClasses.py index 77183be4..f9f9e2df 100644 --- a/BaseClasses.py +++ b/BaseClasses.py @@ -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