mirror of
https://github.com/MarioSpore/Grinch-AP.git
synced 2025-10-21 20:21:32 -06:00
Core: Purge Multiworld.option_name (#5050)
This commit is contained in:
@@ -72,15 +72,6 @@ class AutoWorldRegister(type):
|
||||
dct["required_client_version"] = max(dct["required_client_version"],
|
||||
base.__dict__["required_client_version"])
|
||||
|
||||
# create missing options_dataclass from legacy option_definitions
|
||||
# TODO - remove this once all worlds use options dataclasses
|
||||
if "options_dataclass" not in dct and "option_definitions" in dct:
|
||||
# TODO - switch to deprecate after a version
|
||||
deprecate(f"{name} Assigned options through option_definitions which is now deprecated. "
|
||||
"Please use options_dataclass instead.")
|
||||
dct["options_dataclass"] = make_dataclass(f"{name}Options", dct["option_definitions"].items(),
|
||||
bases=(PerGameCommonOptions,))
|
||||
|
||||
# construct class
|
||||
new_class = super().__new__(mcs, name, bases, dct)
|
||||
new_class.__file__ = sys.modules[new_class.__module__].__file__
|
||||
@@ -493,9 +484,6 @@ class World(metaclass=AutoWorldRegister):
|
||||
Creates a group, which is an instance of World that is responsible for multiple others.
|
||||
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.from_any(option.default)
|
||||
group = cls(multiworld, new_player_id)
|
||||
group.options = cls.options_dataclass(**{option_key: option.from_any(option.default)
|
||||
for option_key, option in cls.options_dataclass.type_hints.items()})
|
||||
|
Reference in New Issue
Block a user