From ce03e8e79dfa6190bb5484c9d58e7519cd3a8962 Mon Sep 17 00:00:00 2001 From: alwaysintreble Date: Tue, 30 Jan 2024 14:25:45 -0600 Subject: [PATCH] Core: call from_any on the options class when creating item links options --- worlds/AutoWorld.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/worlds/AutoWorld.py b/worlds/AutoWorld.py index f56c39f69086..8b913af323d6 100644 --- a/worlds/AutoWorld.py +++ b/worlds/AutoWorld.py @@ -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