diff --git a/worlds/dlcquest/Regions.py b/worlds/dlcquest/Regions.py index 8fcb3cb32a54..402ac722a0ad 100644 --- a/worlds/dlcquest/Regions.py +++ b/worlds/dlcquest/Regions.py @@ -1,4 +1,5 @@ import math +from typing import List from BaseClasses import Entrance, MultiWorld, Region from . import Options @@ -27,12 +28,11 @@ def add_coin(region: Region, coin: int, player: int, suffix: str): def create_regions(multiworld: MultiWorld, player: int, world_options: Options.DLCQuestOptions): region_menu = Region("Menu", player, multiworld) - has_campaign_basic = world_options[Options.Campaign] == Options.Campaign.option_basic or world_options[Options.Campaign] == Options.Campaign.option_both - has_campaign_lfod = world_options[Options.Campaign] == Options.Campaign.option_live_freemium_or_die or world_options[ - Options.Campaign] == Options.Campaign.option_both - has_coinsanity = world_options[Options.CoinSanity] == Options.CoinSanity.option_coin - coin_bundle_size = world_options[Options.CoinSanityRange] - has_item_shuffle = world_options[Options.ItemShuffle] == Options.ItemShuffle.option_shuffled + has_campaign_basic = world_options.campaign == Options.Campaign.option_basic or world_options.campaign == Options.Campaign.option_both + has_campaign_lfod = world_options.campaign == Options.Campaign.option_live_freemium_or_die or world_options.campaign == Options.Campaign.option_both + has_coinsanity = world_options.coinsanity == Options.CoinSanity.option_coin + coin_bundle_size = world_options.coinbundlequantity.value + has_item_shuffle = world_options.item_shuffle == Options.ItemShuffle.option_shuffled multiworld.regions.append(region_menu) diff --git a/worlds/dlcquest/test/__init__.py b/worlds/dlcquest/test/__init__.py index a15ad69f3f41..e998bd8a5e8b 100644 --- a/worlds/dlcquest/test/__init__.py +++ b/worlds/dlcquest/test/__init__.py @@ -41,7 +41,7 @@ def setup_dlc_quest_solo_multiworld(test_options=None, seed=None, _cache: Dict[F multiworld.set_seed(seed) # print(f"Seed: {multiworld.seed}") # Uncomment to print the seed for every test args = Namespace() - for name, option in DLCqworld.option_definitions.items(): + for name, option in DLCqworld.options_dataclass.type_hints.items(): value = option(test_options[name]) if name in test_options else option.from_any(option.default) setattr(args, name, {1: value}) multiworld.set_options(args) diff --git a/worlds/dlcquest/test/option_names.py b/worlds/dlcquest/test/option_names.py index c7d1c0829c71..4a4b46e906cb 100644 --- a/worlds/dlcquest/test/option_names.py +++ b/worlds/dlcquest/test/option_names.py @@ -1,5 +1,5 @@ -from ..Options import dlc_quest_option_classes +from .. import DLCqworld -options_to_exclude = [] -options_to_include = [option_to_include for option_to_include in dlc_quest_option_classes - if option_to_include.internal_name not in options_to_exclude] +options_to_exclude = ["progression_balancing", "accessibility", "start_inventory", "start_hints", "death_link"] +options_to_include = [option for option_name, option in DLCqworld.options_dataclass.type_hints.items() + if option_name not in options_to_exclude]