diff options
| author | Star Rauchenberger <fefferburbia@gmail.com> | 2024-05-22 20:22:39 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-05-23 02:22:39 +0200 |
| commit | 0095771ce091035e001e2ff8556e2656a0498338 (patch) | |
| tree | fa49d181376084ee5db4e1c0f6473ed46ed7dfe7 /options.py | |
| parent | e41bdceb052334f2c86a78ba41411a9c85df7cc5 (diff) | |
| download | lingo-apworld-0095771ce091035e001e2ff8556e2656a0498338.tar.gz lingo-apworld-0095771ce091035e001e2ff8556e2656a0498338.tar.bz2 lingo-apworld-0095771ce091035e001e2ff8556e2656a0498338.zip | |
Lingo: Add option groups (#3352)
* Lingo: Add option groups * Touched up option docstrings
Diffstat (limited to 'options.py')
| -rw-r--r-- | options.py | 60 |
1 files changed, 46 insertions, 14 deletions
| diff --git a/options.py b/options.py index 65f2726..1c1f645 100644 --- a/options.py +++ b/options.py | |||
| @@ -2,7 +2,8 @@ from dataclasses import dataclass | |||
| 2 | 2 | ||
| 3 | from schema import And, Schema | 3 | from schema import And, Schema |
| 4 | 4 | ||
| 5 | from Options import Toggle, Choice, DefaultOnToggle, Range, PerGameCommonOptions, StartInventoryPool, OptionDict | 5 | from Options import Toggle, Choice, DefaultOnToggle, Range, PerGameCommonOptions, StartInventoryPool, OptionDict, \ |
| 6 | OptionGroup | ||
| 6 | from .items import TRAP_ITEMS | 7 | from .items import TRAP_ITEMS |
| 7 | 8 | ||
| 8 | 9 | ||
| @@ -32,8 +33,8 @@ class ProgressiveColorful(DefaultOnToggle): | |||
| 32 | 33 | ||
| 33 | 34 | ||
| 34 | class LocationChecks(Choice): | 35 | 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 | """Determines what locations are available. |
| 36 | achievement panels and a small handful of other panels. | 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. |
| 37 | On "reduced", many of the locations that are associated with opening doors are removed. | 38 | On "reduced", many of the locations that are associated with opening doors are removed. |
| 38 | On "insanity", every individual panel in the game is a location check.""" | 39 | On "insanity", every individual panel in the game is a location check.""" |
| 39 | display_name = "Location Checks" | 40 | display_name = "Location Checks" |
| @@ -43,8 +44,10 @@ class LocationChecks(Choice): | |||
| 43 | 44 | ||
| 44 | 45 | ||
| 45 | class ShuffleColors(DefaultOnToggle): | 46 | class ShuffleColors(DefaultOnToggle): |
| 46 | """If on, an item is added to the pool for every puzzle color (besides White). | 47 | """ |
| 47 | You will need to unlock the requisite colors in order to be able to solve puzzles of that color.""" | 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 | """ | ||
| 48 | display_name = "Shuffle Colors" | 51 | display_name = "Shuffle Colors" |
| 49 | 52 | ||
| 50 | 53 | ||
| @@ -62,20 +65,25 @@ class ShufflePaintings(Toggle): | |||
| 62 | 65 | ||
| 63 | 66 | ||
| 64 | class EnablePilgrimage(Toggle): | 67 | 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. | ||
| 66 | If off, the pilgrimage will be deactivated, and the sun painting will be added to the pool, even if door shuffle is off.""" | 70 | If off, the pilgrimage will be deactivated, and the sun painting will be added to the pool, even if door shuffle is off.""" |
| 67 | display_name = "Enable Pilgrimage" | 71 | display_name = "Enable Pilgrimage" |
| 68 | 72 | ||
| 69 | 73 | ||
| 70 | class PilgrimageAllowsRoofAccess(DefaultOnToggle): | 74 | class PilgrimageAllowsRoofAccess(DefaultOnToggle): |
| 71 | """If on, you may use the Crossroads roof access during a pilgrimage (and you may be expected to do so). | 75 | """ |
| 72 | Otherwise, pilgrimage will be deactivated when going up the stairs.""" | 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 | """ | ||
| 73 | display_name = "Allow Roof Access for Pilgrimage" | 79 | display_name = "Allow Roof Access for Pilgrimage" |
| 74 | 80 | ||
| 75 | 81 | ||
| 76 | class PilgrimageAllowsPaintings(DefaultOnToggle): | 82 | class PilgrimageAllowsPaintings(DefaultOnToggle): |
| 77 | """If on, you may use paintings during a pilgrimage (and you may be expected to do so). | 83 | """ |
| 78 | Otherwise, pilgrimage will be deactivated when going through a painting.""" | 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 | """ | ||
| 79 | display_name = "Allow Paintings for Pilgrimage" | 87 | display_name = "Allow Paintings for Pilgrimage" |
| 80 | 88 | ||
| 81 | 89 | ||
| @@ -137,8 +145,10 @@ class Level2Requirement(Range): | |||
| 137 | 145 | ||
| 138 | 146 | ||
| 139 | class EarlyColorHallways(Toggle): | 147 | class EarlyColorHallways(Toggle): |
| 140 | """When on, a painting warp to the color hallways area will appear in the starting room. | 148 | """ |
| 141 | This lets you avoid being trapped in the starting room for long periods of time when door shuffle is on.""" | 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 | """ | ||
| 142 | display_name = "Early Color Hallways" | 152 | display_name = "Early Color Hallways" |
| 143 | 153 | ||
| 144 | 154 | ||
| @@ -151,8 +161,10 @@ class TrapPercentage(Range): | |||
| 151 | 161 | ||
| 152 | 162 | ||
| 153 | class TrapWeights(OptionDict): | 163 | class TrapWeights(OptionDict): |
| 154 | """Specify the distribution of traps that should be placed into the pool. | 164 | """ |
| 155 | If you don't want a specific type of trap, set the weight to zero.""" | 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 | """ | ||
| 156 | display_name = "Trap Weights" | 168 | display_name = "Trap Weights" |
| 157 | schema = Schema({trap_name: And(int, lambda n: n >= 0) for trap_name in TRAP_ITEMS}) | 169 | schema = Schema({trap_name: And(int, lambda n: n >= 0) for trap_name in TRAP_ITEMS}) |
| 158 | default = {trap_name: 1 for trap_name in TRAP_ITEMS} | 170 | default = {trap_name: 1 for trap_name in TRAP_ITEMS} |
| @@ -171,6 +183,26 @@ class DeathLink(Toggle): | |||
| 171 | display_name = "Death Link" | 183 | display_name = "Death Link" |
| 172 | 184 | ||
| 173 | 185 | ||
| 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 | |||
| 174 | @dataclass | 206 | @dataclass |
| 175 | class LingoOptions(PerGameCommonOptions): | 207 | class LingoOptions(PerGameCommonOptions): |
| 176 | shuffle_doors: ShuffleDoors | 208 | shuffle_doors: ShuffleDoors |
