Skip to content

Commit

Permalink
Core: call from_any on the options class when creating item links opt…
Browse files Browse the repository at this point in the history
…ions
  • Loading branch information
alwaysintreble committed Jan 30, 2024
1 parent 70fdd6b commit ce03e8e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions worlds/AutoWorld.py
Original file line number Diff line number Diff line change
Expand Up @@ -416,9 +416,9 @@ def create_group(cls, multiworld: "MultiWorld", new_player_id: int, players: Set
An example case is ItemLinks creating these."""
# TODO remove loop when worlds use options dataclass
for option_key, option in cls.options_dataclass.type_hints.items():
getattr(multiworld, option_key)[new_player_id] = option(option.default)
getattr(multiworld, option_key)[new_player_id] = option.from_any(option.default)
group = cls(multiworld, new_player_id)
group.options = cls.options_dataclass(**{option_key: option(option.default)
group.options = cls.options_dataclass(**{option_key: option.from_any(option.default)
for option_key, option in cls.options_dataclass.type_hints.items()})

return group
Expand Down

0 comments on commit ce03e8e

Please sign in to comment.