Skip to content

Commit

Permalink
Add option groups
Browse files Browse the repository at this point in the history
  • Loading branch information
NewSoupVi committed May 19, 2024
1 parent 14321d6 commit a9a3b09
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 2 deletions.
3 changes: 2 additions & 1 deletion worlds/witness/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
from .data.utils import get_audio_logs
from .hints import CompactItemData, create_all_hints, make_compact_hint_data, make_laser_hints
from .locations import WitnessPlayerLocations, static_witness_locations
from .options import TheWitnessOptions
from .options import TheWitnessOptions, witness_option_groups
from .player_items import WitnessItem, WitnessPlayerItems
from .player_logic import WitnessPlayerLogic
from .presets import witness_option_presets
Expand All @@ -36,6 +36,7 @@ class WitnessWebWorld(WebWorld):
)]

options_presets = witness_option_presets
option_groups = witness_option_groups


class WitnessWorld(World):
Expand Down
44 changes: 43 additions & 1 deletion worlds/witness/options.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from schema import And, Schema

from Options import Choice, DefaultOnToggle, OptionDict, PerGameCommonOptions, Range, Toggle
from Options import Choice, DefaultOnToggle, OptionDict, PerGameCommonOptions, Range, Toggle, OptionGroup

from .data import static_logic as static_witness_logic
from .data.item_definition_classes import ItemCategory, WeightedItemDefinition
Expand Down Expand Up @@ -332,3 +332,45 @@ class TheWitnessOptions(PerGameCommonOptions):
laser_hints: LaserHints
death_link: DeathLink
death_link_amnesty: DeathLinkAmnesty


witness_option_groups = [
OptionGroup("Puzzles & Goal", [
PuzzleRandomization,
VictoryCondition,
MountainLasers,
ChallengeLasers,
]),
OptionGroup("Locations", [
ShuffleDiscardedPanels,
ShuffleVaultBoxes,
ShuffleEnvironmentalPuzzles,
EnvironmentalPuzzlesDifficulty,
ShufflePostgame,
DisableNonRandomizedPuzzles,
]),
OptionGroup("Progression Items", [
ShuffleSymbols,
ShuffleDoors,
DoorGroupings,
ShuffleLasers,
ShuffleBoat,
ObeliskKeys,
]),
OptionGroup("Filler Items", [
PuzzleSkipAmount,
TrapPercentage,
TrapWeights
]),
OptionGroup("Hints", [
HintAmount,
AreaHintPercentage,
LaserHints
]),
OptionGroup("Misc", [
EarlyCaves,
ElevatorsComeToYou,
DeathLink,
DeathLinkAmnesty,
])
]

0 comments on commit a9a3b09

Please sign in to comment.