diff --git a/Options.py b/Options.py index 2e3927aae3f3..5fe4087132f7 100644 --- a/Options.py +++ b/Options.py @@ -1110,6 +1110,11 @@ class PerGameCommonOptions(CommonOptions): item_links: ItemLinks +@dataclass +class DeathLinkMixin: + death_link: DeathLink + + def generate_yaml_templates(target_folder: typing.Union[str, "pathlib.Path"], generate_hidden: bool = True): import os diff --git a/worlds/messenger/options.py b/worlds/messenger/options.py index 1da544bee70c..6984e215472a 100644 --- a/worlds/messenger/options.py +++ b/worlds/messenger/options.py @@ -3,7 +3,7 @@ from schema import And, Optional, Or, Schema -from Options import Accessibility, Choice, DeathLink, DefaultOnToggle, OptionDict, PerGameCommonOptions, Range, \ +from Options import Accessibility, Choice, DeathLinkMixin, DefaultOnToggle, OptionDict, PerGameCommonOptions, Range, \ StartInventoryPool, Toggle @@ -133,7 +133,7 @@ class PlannedShopPrices(OptionDict): @dataclass -class MessengerOptions(PerGameCommonOptions): +class MessengerOptions(DeathLinkMixin, PerGameCommonOptions): accessibility: MessengerAccessibility start_inventory: StartInventoryPool logic_level: Logic @@ -146,5 +146,3 @@ class MessengerOptions(PerGameCommonOptions): percent_seals_required: RequiredSeals shop_price: ShopPrices shop_price_plan: PlannedShopPrices - death_link: DeathLink -