Plando: fix automatic locations only working for the first world (#2063)

* copy location_names for each iteration

* remove copy, just set the list
This commit is contained in:
Silvris 2023-07-31 16:16:42 -05:00 committed by GitHub
parent f29d5c8cae
commit a9fb7e2ace
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 2 deletions

View File

@ -487,8 +487,10 @@ class MultiWorld():
def get_unfilled_locations_for_players(self, location_names: List[str], players: Iterable[int]):
for player in players:
if not location_names:
location_names = [location.name for location in self.get_unfilled_locations(player)]
for location_name in location_names:
valid_locations = [location.name for location in self.get_unfilled_locations(player)]
else:
valid_locations = location_names
for location_name in valid_locations:
location = self._location_cache.get((location_name, player), None)
if location is not None and location.item is None:
yield location