spheres should ignore empty locations
This commit is contained in:
parent
8bfddb7fc6
commit
612c3c23c0
|
@ -415,8 +415,7 @@ class MultiWorld():
|
||||||
|
|
||||||
def get_spheres(self):
|
def get_spheres(self):
|
||||||
state = CollectionState(self)
|
state = CollectionState(self)
|
||||||
|
locations = set(self.get_filled_locations())
|
||||||
locations = set(self.get_locations())
|
|
||||||
|
|
||||||
while locations:
|
while locations:
|
||||||
sphere = set()
|
sphere = set()
|
||||||
|
@ -424,10 +423,7 @@ class MultiWorld():
|
||||||
for location in locations:
|
for location in locations:
|
||||||
if location.can_reach(state):
|
if location.can_reach(state):
|
||||||
sphere.add(location)
|
sphere.add(location)
|
||||||
sphere_list = list(sphere)
|
yield sphere
|
||||||
sphere_list.sort(key=lambda location: location.name)
|
|
||||||
self.random.shuffle(sphere_list)
|
|
||||||
yield sphere_list
|
|
||||||
if not sphere:
|
if not sphere:
|
||||||
if locations:
|
if locations:
|
||||||
yield locations # unreachable locations
|
yield locations # unreachable locations
|
||||||
|
|
|
@ -164,7 +164,7 @@ def ShopSlotFill(world):
|
||||||
blacklist_word in item_name for blacklist_word in blacklist_words)}
|
blacklist_word in item_name for blacklist_word in blacklist_words)}
|
||||||
blacklist_words.add("Bee")
|
blacklist_words.add("Bee")
|
||||||
|
|
||||||
locations_per_sphere = list(list(sphere) for sphere in world.get_spheres())
|
locations_per_sphere = list(list(sphere).sort(key=lambda location: location.name) for sphere in world.get_spheres())
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue