Option groups!

This commit is contained in:
spinerak
2024-06-08 00:42:45 +02:00
parent 25df8e5248
commit 6250923f5e
2 changed files with 16 additions and 4 deletions

View File

@@ -1,4 +1,4 @@
from Options import Choice, Range, PerGameCommonOptions
from Options import Choice, Range, PerGameCommonOptions, OptionGroup
from dataclasses import dataclass
class GameDifficulty(Choice):
@@ -266,6 +266,8 @@ class YachtDiceOptions(PerGameCommonOptions):
alternative_categories: AlternativeCategories
allow_manual_input: AllowManual
#the following options determine what extra items are shuffled into the pool:
weight_of_dice: ChanceOfDice
weight_of_roll: ChanceOfRoll
@@ -279,6 +281,14 @@ class YachtDiceOptions(PerGameCommonOptions):
add_bonus_points: AddExtraPoints
add_story_chapters: AddStoryChapters
which_story: WhichStory
yd_option_groups = [
OptionGroup("Extra progression items", [
ChanceOfDice, ChanceOfRoll, ChanceOfFixedScoreMultiplier, ChanceOfStepScoreMultiplier,
ChanceOfDoubleCategory, ChanceOfPoints, PointsSize
]),
allow_manual_input: AllowManual
OptionGroup("Other items", [
MinimizeExtraItems, AddExtraPoints, AddStoryChapters, WhichStory
])
]

View File

@@ -3,7 +3,7 @@ import math
from BaseClasses import Region, Entrance, Item, Tutorial, CollectionState
from .Items import YachtDiceItem, item_table, item_groups
from .Locations import YachtDiceLocation, all_locations, ini_locations
from .Options import YachtDiceOptions
from .Options import YachtDiceOptions, yd_option_groups
from .Rules import set_yacht_rules, set_yacht_completion_rules, dice_simulation
from worlds.AutoWorld import World, WebWorld
@@ -18,6 +18,8 @@ class YachtDiceWeb(WebWorld):
"setup/en",
["Spineraks"]
)]
option_groups = yd_option_groups
class YachtDiceWorld(World):