mirror of
https://github.com/MarioSpore/Grinch-AP.git
synced 2025-10-21 20:21:32 -06:00
Core: call from_any on the options class when creating item links options (#2783)
This commit is contained in:
@@ -422,9 +422,9 @@ class World(metaclass=AutoWorldRegister):
|
|||||||
An example case is ItemLinks creating these."""
|
An example case is ItemLinks creating these."""
|
||||||
# TODO remove loop when worlds use options dataclass
|
# TODO remove loop when worlds use options dataclass
|
||||||
for option_key, option in cls.options_dataclass.type_hints.items():
|
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 = 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()})
|
for option_key, option in cls.options_dataclass.type_hints.items()})
|
||||||
|
|
||||||
return group
|
return group
|
||||||
|
Reference in New Issue
Block a user