Skip to content

Commit a9fb7e2

Browse files
authored
Plando: fix automatic locations only working for the first world (#2063)
* copy location_names for each iteration * remove copy, just set the list
1 parent f29d5c8 commit a9fb7e2

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

BaseClasses.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -487,8 +487,10 @@ def get_placeable_locations(self, state=None, player=None) -> List[Location]:
487487
def get_unfilled_locations_for_players(self, location_names: List[str], players: Iterable[int]):
488488
for player in players:
489489
if not location_names:
490-
location_names = [location.name for location in self.get_unfilled_locations(player)]
491-
for location_name in location_names:
490+
valid_locations = [location.name for location in self.get_unfilled_locations(player)]
491+
else:
492+
valid_locations = location_names
493+
for location_name in valid_locations:
492494
location = self._location_cache.get((location_name, player), None)
493495
if location is not None and location.item is None:
494496
yield location

0 commit comments

Comments
 (0)