mirror of
https://github.com/MarioSpore/Grinch-AP.git
synced 2025-10-21 12:11:33 -06:00
Options: add a DeathLinkMixin dataclass to easily standardize death_link (#2355)
* Options: add a DeathLinkOption dataclass to easily standardize death_link * rename to DeathLinkMixin * Update worlds/messenger/options.py
This commit is contained in:
@@ -1110,6 +1110,11 @@ class PerGameCommonOptions(CommonOptions):
|
|||||||
item_links: ItemLinks
|
item_links: ItemLinks
|
||||||
|
|
||||||
|
|
||||||
|
@dataclass
|
||||||
|
class DeathLinkMixin:
|
||||||
|
death_link: DeathLink
|
||||||
|
|
||||||
|
|
||||||
def generate_yaml_templates(target_folder: typing.Union[str, "pathlib.Path"], generate_hidden: bool = True):
|
def generate_yaml_templates(target_folder: typing.Union[str, "pathlib.Path"], generate_hidden: bool = True):
|
||||||
import os
|
import os
|
||||||
|
|
||||||
|
@@ -3,7 +3,7 @@ from typing import Dict
|
|||||||
|
|
||||||
from schema import And, Optional, Or, Schema
|
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
|
StartInventoryPool, Toggle
|
||||||
|
|
||||||
|
|
||||||
@@ -133,7 +133,7 @@ class PlannedShopPrices(OptionDict):
|
|||||||
|
|
||||||
|
|
||||||
@dataclass
|
@dataclass
|
||||||
class MessengerOptions(PerGameCommonOptions):
|
class MessengerOptions(DeathLinkMixin, PerGameCommonOptions):
|
||||||
accessibility: MessengerAccessibility
|
accessibility: MessengerAccessibility
|
||||||
start_inventory: StartInventoryPool
|
start_inventory: StartInventoryPool
|
||||||
logic_level: Logic
|
logic_level: Logic
|
||||||
@@ -146,5 +146,3 @@ class MessengerOptions(PerGameCommonOptions):
|
|||||||
percent_seals_required: RequiredSeals
|
percent_seals_required: RequiredSeals
|
||||||
shop_price: ShopPrices
|
shop_price: ShopPrices
|
||||||
shop_price_plan: PlannedShopPrices
|
shop_price_plan: PlannedShopPrices
|
||||||
death_link: DeathLink
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user