From c6b1039e0fc5a8b41c934ecb96534c9e937985eb Mon Sep 17 00:00:00 2001 From: Aaron Wagener Date: Thu, 7 Mar 2024 01:40:09 -0600 Subject: [PATCH] Core: call from_any on the options class when creating item links options (#2783) --- worlds/AutoWorld.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/worlds/AutoWorld.py b/worlds/AutoWorld.py index dd0f46f6..41796371 100644 --- a/worlds/AutoWorld.py +++ b/worlds/AutoWorld.py @@ -422,9 +422,9 @@ class World(metaclass=AutoWorldRegister): 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