Saving Princess: Fix each slot sharing the same music_table (#5952)

`music_table` was initialized on the `SavingPrincessWorld` *class*, so
was being shared by each Saving Princess slot in the multiworld.

This has been fixed by initializing the `music_table` attribute on each
`SavingPrincessWorld` *instance* in `generate_early()` instead.
This commit is contained in:
Mysteryem
2026-02-19 19:13:54 +00:00
committed by GitHub
parent c505b1c32c
commit 18e3a8911f

View File

@@ -97,11 +97,12 @@ class SavingPrincessWorld(World):
settings: ClassVar[SavingPrincessSettings] settings: ClassVar[SavingPrincessSettings]
is_pool_expanded: bool = False is_pool_expanded: bool = False
music_table: List[int] = list(range(16)) music_table: List[int]
def generate_early(self) -> None: def generate_early(self) -> None:
if not self.player_name.isascii(): if not self.player_name.isascii():
raise OptionError(f"{self.player_name}'s name must be only ASCII.") raise OptionError(f"{self.player_name}'s name must be only ASCII.")
self.music_table = list(range(16))
self.is_pool_expanded = self.options.expanded_pool > 0 self.is_pool_expanded = self.options.expanded_pool > 0
if self.options.music_shuffle: if self.options.music_shuffle:
self.random.shuffle(self.music_table) self.random.shuffle(self.music_table)