mirror of
https://github.com/MarioSpore/Grinch-AP.git
synced 2025-10-21 20:21:32 -06:00
Core: improve fulfills_accessibility performance
This commit is contained in:
@@ -577,10 +577,9 @@ class MultiWorld():
|
|||||||
|
|
||||||
while locations:
|
while locations:
|
||||||
sphere: List[Location] = []
|
sphere: List[Location] = []
|
||||||
for location in locations:
|
for n in range(len(locations) - 1, -1, -1):
|
||||||
if location.can_reach(state):
|
if locations[n].can_reach(state):
|
||||||
assert location not in sphere
|
sphere.append(locations.pop(n))
|
||||||
sphere.append(location)
|
|
||||||
|
|
||||||
if not sphere:
|
if not sphere:
|
||||||
# ran out of places and did not finish yet, quit
|
# ran out of places and did not finish yet, quit
|
||||||
@@ -589,7 +588,6 @@ class MultiWorld():
|
|||||||
return False
|
return False
|
||||||
|
|
||||||
for location in sphere:
|
for location in sphere:
|
||||||
locations.remove(location)
|
|
||||||
if location.item:
|
if location.item:
|
||||||
state.collect(location.item, True, location)
|
state.collect(location.item, True, location)
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user