Skip to content

Commit 6bf1b4e

Browse files
alwaysintrebleJouramie
authored andcommitted
Stardew Valley: Use the pre-existing cache rather than ignoring it (ArchipelagoMW#2368)
1 parent 04809bf commit 6bf1b4e

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

worlds/stardew_valley/__init__.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -100,15 +100,15 @@ def create_region(name: str, exits: Iterable[str]) -> Region:
100100
return region
101101

102102
world_regions, self.randomized_entrances = create_regions(create_region, self.multiworld.random, self.options)
103-
self.multiworld.regions.extend(world_regions)
104103

105104
def add_location(name: str, code: Optional[int], region: str):
106-
region = self.multiworld.get_region(region, self.player)
105+
region = world_regions[region]
107106
location = StardewLocation(self.player, name, code, region)
108107
location.access_rule = lambda _: True
109108
region.locations.append(location)
110109

111110
create_locations(add_location, self.options, self.multiworld.random)
111+
self.multiworld.regions.extend(world_regions.values())
112112

113113
def create_items(self):
114114
self.precollect_starting_season()

worlds/stardew_valley/regions.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -429,7 +429,7 @@ def create_final_connections(world_options) -> List[ConnectionData]:
429429

430430

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

447-
return regions.values(), randomized_data
447+
return regions, randomized_data
448448

449449

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

0 commit comments

Comments
 (0)