Skip to content

Commit

Permalink
unbreak UT for dlc_only slots by making sure self/world.spawn gets in…
Browse files Browse the repository at this point in the history
…itialized even on the 1st mostly useless UT generation
  • Loading branch information
Ixrec committed Dec 23, 2024
1 parent bd8832d commit 7ae3272
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions worlds/outer_wilds/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,12 @@ def generate_early(self) -> None:
if self.options.shuffle_spacesuit and self.options.spawn != Spawn.option_vanilla:
raise OptionError('Incompatible options: shuffle_spacesuit is true and spawn is non-vanilla (%s)', self.options.spawn)

# When Universal Tracker is not involved, spawn is just a normal option.
# But we also run this before the UT check because if we're in UT's 1st pass, we won't have slot_data's spawn
# yet, and we still need to set this to avoid a DLC-only slot from thinking it has vanilla spawn and crashing
# when items.py tries to lock Launch Codes on a location that doesn't exist.
self.spawn = self.options.spawn

# implement Universal Tracker support
if hasattr(self.multiworld, "generation_is_fake"):
if hasattr(self.multiworld, "re_gen_passthrough"):
Expand All @@ -78,9 +84,6 @@ def generate_early(self) -> None:
self.spawn = slot_data["spawn"]
return

# when Universal Tracker is not involved, spawn is just a normal option
self.spawn = self.options.spawn

# generate game-specific randomizations separate from AP items/locations
self.eotu_coordinates = generate_random_coordinates(self.random) \
if self.options.randomize_coordinates else "vanilla"
Expand Down

0 comments on commit 7ae3272

Please sign in to comment.