Skip to content

Commit

Permalink
SDV: Use the pre-existing cache rather than ignoring it
Browse files Browse the repository at this point in the history
  • Loading branch information
alwaysintreble committed Oct 25, 2023
1 parent 33fe02a commit 0aade46
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions worlds/stardew_valley/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,15 +100,15 @@ def create_region(name: str, exits: Iterable[str]) -> Region:
return region

world_regions, self.randomized_entrances = create_regions(create_region, self.multiworld.random, self.options)
self.multiworld.regions.extend(world_regions)

def add_location(name: str, code: Optional[int], region: str):
region = self.multiworld.get_region(region, self.player)
region = world_regions[region]
location = StardewLocation(self.player, name, code, region)
location.access_rule = lambda _: True
region.locations.append(location)

create_locations(add_location, self.options, self.multiworld.random)
self.multiworld.regions.extend(world_regions.values())

def create_items(self):
self.precollect_starting_season()
Expand Down
4 changes: 2 additions & 2 deletions worlds/stardew_valley/regions.py
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,7 @@ def create_final_connections(world_options) -> List[ConnectionData]:


def create_regions(region_factory: RegionFactory, random: Random, world_options) -> Tuple[
Iterable[Region], Dict[str, str]]:
Dict[str, Region], Dict[str, str]]:
final_regions = create_final_regions(world_options)
regions: Dict[str: Region] = {region.name: region_factory(region.name, region.exits) for region in
final_regions}
Expand All @@ -444,7 +444,7 @@ def create_regions(region_factory: RegionFactory, random: Random, world_options)
if connection.name in entrances:
entrances[connection.name].connect(regions[connection.destination])

return regions.values(), randomized_data
return regions, randomized_data


def randomize_connections(random: Random, world_options, regions_by_name) -> Tuple[
Expand Down

0 comments on commit 0aade46

Please sign in to comment.