mirror of
https://github.com/MarioSpore/Grinch-AP.git
synced 2025-10-21 20:21:32 -06:00
spheres should ignore empty locations
This commit is contained in:
@@ -415,8 +415,7 @@ class MultiWorld():
|
||||
|
||||
def get_spheres(self):
|
||||
state = CollectionState(self)
|
||||
|
||||
locations = set(self.get_locations())
|
||||
locations = set(self.get_filled_locations())
|
||||
|
||||
while locations:
|
||||
sphere = set()
|
||||
@@ -424,10 +423,7 @@ class MultiWorld():
|
||||
for location in locations:
|
||||
if location.can_reach(state):
|
||||
sphere.add(location)
|
||||
sphere_list = list(sphere)
|
||||
sphere_list.sort(key=lambda location: location.name)
|
||||
self.random.shuffle(sphere_list)
|
||||
yield sphere_list
|
||||
yield sphere
|
||||
if not sphere:
|
||||
if locations:
|
||||
yield locations # unreachable locations
|
||||
|
Reference in New Issue
Block a user