diff --git a/BaseClasses.py b/BaseClasses.py index ec3fa9ce..bf115e3f 100644 --- a/BaseClasses.py +++ b/BaseClasses.py @@ -223,7 +223,7 @@ class MultiWorld(): AutoWorld.AutoWorldRegister.world_types[self.game[player]].options_dataclass.type_hints} for option_key in all_keys: option = Utils.DeprecateDict(f"Getting options from multiworld is now deprecated. " - f"Please use `self.options.{option_key}` instead.") + f"Please use `self.options.{option_key}` instead.", True) option.update(getattr(args, option_key, {})) setattr(self, option_key, option) diff --git a/worlds/AutoWorld.py b/worlds/AutoWorld.py index d1f4a772..b4ff2419 100644 --- a/worlds/AutoWorld.py +++ b/worlds/AutoWorld.py @@ -12,6 +12,7 @@ from typing import (Any, Callable, ClassVar, Dict, FrozenSet, Iterable, List, Ma from Options import item_and_loc_options, ItemsAccessibility, OptionGroup, PerGameCommonOptions from BaseClasses import CollectionState +from Utils import deprecate if TYPE_CHECKING: from BaseClasses import MultiWorld, Item, Location, Tutorial, Region, Entrance @@ -75,9 +76,8 @@ class AutoWorldRegister(type): # 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 - if __debug__: - logging.warning(f"{name} Assigned options through option_definitions which is now deprecated. " - "Please use options_dataclass instead.") + 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,))