Core: call from_any on the options class when creating item links options (#2783)
This commit is contained in:
parent
ac791f2999
commit
c6b1039e0f
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue