[OC2] Enabled DLC Option (#1688)

- New OC2 option `DLCOptionSet`, which is a list of DLCs whose levels should or shouldn't be used for entrance randomizer (and mention in documentation). By default, DLC owners now need to enable DLCs in weighted settings.
- Throw user-friendly exceptions when contradictory settings are enabled
- Slightly relax generation requirements for sphere 1/2 level permutations
- Write entrance randomizer info in spoiler log
- Skip adding "Dark Green Ramp" to item pool if Kevin Levels are disabled
This commit is contained in:
toasterparty
2023-04-10 18:43:29 -07:00
committed by GitHub
parent 3c3954f5e8
commit c711d803f8
7 changed files with 130 additions and 71 deletions

View File

@@ -1,7 +1,7 @@
from enum import IntEnum
from typing import TypedDict
from Options import Toggle, DefaultOnToggle, Range, Choice
from Options import DefaultOnToggle, Toggle, Range, Choice, OptionSet
from .Overcooked2Levels import Overcooked2Dlc
class LocationBalancingMode(IntEnum):
disabled = 0
@@ -87,6 +87,13 @@ class ShuffleLevelOrder(OC2OnToggle):
display_name = "Shuffle Level Order"
class DLCOptionSet(OptionSet):
"""Which DLCs should be included when 'Shuffle Level Order' is enabled?'"""
display_name = "Enabled DLC"
default = {"Story", "Seasonal"}
valid_keys = [dlc.value for dlc in Overcooked2Dlc]
class IncludeHordeLevels(OC2OnToggle):
"""Includes "Horde Defense" levels in the pool of possible kitchens when Shuffle Level Order is enabled. Also adds
two horde-specific items into the item pool."""
@@ -170,6 +177,7 @@ overcooked_options = {
# randomization options
"shuffle_level_order": ShuffleLevelOrder,
"include_dlcs": DLCOptionSet,
"include_horde_levels": IncludeHordeLevels,
"prep_levels": PrepLevels,
"kevin_levels": KevinLevels,