Skip to content

Commit 0583567

Browse files
hatkirbyqwint
authored andcommitted
Lingo: Add option groups (ArchipelagoMW#3352)
* Lingo: Add option groups * Touched up option docstrings
1 parent e1fe999 commit 0583567

File tree

2 files changed

+48
-15
lines changed

2 files changed

+48
-15
lines changed

worlds/lingo/__init__.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,13 @@
99
from .datatypes import Room, RoomEntrance
1010
from .items import ALL_ITEM_TABLE, ITEMS_BY_GROUP, TRAP_ITEMS, LingoItem
1111
from .locations import ALL_LOCATION_TABLE, LOCATIONS_BY_GROUP
12-
from .options import LingoOptions
12+
from .options import LingoOptions, lingo_option_groups
1313
from .player_logic import LingoPlayerLogic
1414
from .regions import create_regions
1515

1616

1717
class LingoWebWorld(WebWorld):
18+
option_groups = lingo_option_groups
1819
theme = "grass"
1920
tutorials = [Tutorial(
2021
"Multiworld Setup Guide",

worlds/lingo/options.py

+46-14
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22

33
from schema import And, Schema
44

5-
from Options import Toggle, Choice, DefaultOnToggle, Range, PerGameCommonOptions, StartInventoryPool, OptionDict
5+
from Options import Toggle, Choice, DefaultOnToggle, Range, PerGameCommonOptions, StartInventoryPool, OptionDict, \
6+
OptionGroup
67
from .items import TRAP_ITEMS
78

89

@@ -32,8 +33,8 @@ class ProgressiveColorful(DefaultOnToggle):
3233

3334

3435
class LocationChecks(Choice):
35-
"""On "normal", there will be a location check for each panel set that would ordinarily open a door, as well as for
36-
achievement panels and a small handful of other panels.
36+
"""Determines what locations are available.
37+
On "normal", there will be a location check for each panel set that would ordinarily open a door, as well as for achievement panels and a small handful of other panels.
3738
On "reduced", many of the locations that are associated with opening doors are removed.
3839
On "insanity", every individual panel in the game is a location check."""
3940
display_name = "Location Checks"
@@ -43,8 +44,10 @@ class LocationChecks(Choice):
4344

4445

4546
class ShuffleColors(DefaultOnToggle):
46-
"""If on, an item is added to the pool for every puzzle color (besides White).
47-
You will need to unlock the requisite colors in order to be able to solve puzzles of that color."""
47+
"""
48+
If on, an item is added to the pool for every puzzle color (besides White).
49+
You will need to unlock the requisite colors in order to be able to solve puzzles of that color.
50+
"""
4851
display_name = "Shuffle Colors"
4952

5053

@@ -62,20 +65,25 @@ class ShufflePaintings(Toggle):
6265

6366

6467
class EnablePilgrimage(Toggle):
65-
"""If on, you are required to complete a pilgrimage in order to access the Pilgrim Antechamber.
68+
"""Determines how the pilgrimage works.
69+
If on, you are required to complete a pilgrimage in order to access the Pilgrim Antechamber.
6670
If off, the pilgrimage will be deactivated, and the sun painting will be added to the pool, even if door shuffle is off."""
6771
display_name = "Enable Pilgrimage"
6872

6973

7074
class PilgrimageAllowsRoofAccess(DefaultOnToggle):
71-
"""If on, you may use the Crossroads roof access during a pilgrimage (and you may be expected to do so).
72-
Otherwise, pilgrimage will be deactivated when going up the stairs."""
75+
"""
76+
If on, you may use the Crossroads roof access during a pilgrimage (and you may be expected to do so).
77+
Otherwise, pilgrimage will be deactivated when going up the stairs.
78+
"""
7379
display_name = "Allow Roof Access for Pilgrimage"
7480

7581

7682
class PilgrimageAllowsPaintings(DefaultOnToggle):
77-
"""If on, you may use paintings during a pilgrimage (and you may be expected to do so).
78-
Otherwise, pilgrimage will be deactivated when going through a painting."""
83+
"""
84+
If on, you may use paintings during a pilgrimage (and you may be expected to do so).
85+
Otherwise, pilgrimage will be deactivated when going through a painting.
86+
"""
7987
display_name = "Allow Paintings for Pilgrimage"
8088

8189

@@ -137,8 +145,10 @@ class Level2Requirement(Range):
137145

138146

139147
class EarlyColorHallways(Toggle):
140-
"""When on, a painting warp to the color hallways area will appear in the starting room.
141-
This lets you avoid being trapped in the starting room for long periods of time when door shuffle is on."""
148+
"""
149+
When on, a painting warp to the color hallways area will appear in the starting room.
150+
This lets you avoid being trapped in the starting room for long periods of time when door shuffle is on.
151+
"""
142152
display_name = "Early Color Hallways"
143153

144154

@@ -151,8 +161,10 @@ class TrapPercentage(Range):
151161

152162

153163
class TrapWeights(OptionDict):
154-
"""Specify the distribution of traps that should be placed into the pool.
155-
If you don't want a specific type of trap, set the weight to zero."""
164+
"""
165+
Specify the distribution of traps that should be placed into the pool.
166+
If you don't want a specific type of trap, set the weight to zero.
167+
"""
156168
display_name = "Trap Weights"
157169
schema = Schema({trap_name: And(int, lambda n: n >= 0) for trap_name in TRAP_ITEMS})
158170
default = {trap_name: 1 for trap_name in TRAP_ITEMS}
@@ -171,6 +183,26 @@ class DeathLink(Toggle):
171183
display_name = "Death Link"
172184

173185

186+
lingo_option_groups = [
187+
OptionGroup("Pilgrimage", [
188+
EnablePilgrimage,
189+
PilgrimageAllowsRoofAccess,
190+
PilgrimageAllowsPaintings,
191+
SunwarpAccess,
192+
ShuffleSunwarps,
193+
]),
194+
OptionGroup("Fine-tuning", [
195+
ProgressiveOrangeTower,
196+
ProgressiveColorful,
197+
MasteryAchievements,
198+
Level2Requirement,
199+
TrapPercentage,
200+
TrapWeights,
201+
PuzzleSkipPercentage,
202+
])
203+
]
204+
205+
174206
@dataclass
175207
class LingoOptions(PerGameCommonOptions):
176208
shuffle_doors: ShuffleDoors

0 commit comments

Comments
 (0)