mirror of
https://github.com/MarioSpore/Grinch-AP.git
synced 2025-10-21 12:11:33 -06:00
The Messenger: Swap Options Docstrings to use rst, Add Option Groups (#4913)
Co-authored-by: Exempt-Medic <60412657+Exempt-Medic@users.noreply.github.com>
This commit is contained in:
@@ -11,7 +11,7 @@ from .client_setup import launch_game
|
||||
from .connections import CONNECTIONS, RANDOMIZED_CONNECTIONS, TRANSITIONS
|
||||
from .constants import ALL_ITEMS, ALWAYS_LOCATIONS, BOSS_LOCATIONS, FILLER, NOTES, PHOBEKINS, PROG_ITEMS, TRAPS, \
|
||||
USEFUL_ITEMS
|
||||
from .options import AvailablePortals, Goal, Logic, MessengerOptions, NotesNeeded, ShuffleTransitions
|
||||
from .options import AvailablePortals, Goal, Logic, MessengerOptions, NotesNeeded, option_groups, ShuffleTransitions
|
||||
from .portals import PORTALS, add_closed_portal_reqs, disconnect_portals, shuffle_portals, validate_portals
|
||||
from .regions import LEVELS, MEGA_SHARDS, LOCATIONS, REGION_CONNECTIONS
|
||||
from .rules import MessengerHardRules, MessengerOOBRules, MessengerRules
|
||||
@@ -35,6 +35,7 @@ class MessengerSettings(Group):
|
||||
|
||||
class MessengerWeb(WebWorld):
|
||||
theme = "ocean"
|
||||
rich_text_options_doc = True
|
||||
|
||||
bug_report_page = "https://github.com/alwaysintreble/TheMessengerRandomizerModAP/issues"
|
||||
|
||||
@@ -56,6 +57,7 @@ class MessengerWeb(WebWorld):
|
||||
)
|
||||
|
||||
tutorials = [tut_en, plando_en]
|
||||
option_groups = option_groups
|
||||
|
||||
|
||||
class MessengerWorld(World):
|
||||
|
@@ -2,8 +2,11 @@ from dataclasses import dataclass
|
||||
|
||||
from schema import And, Optional, Or, Schema
|
||||
|
||||
from Options import Choice, DeathLinkMixin, DefaultOnToggle, ItemsAccessibility, OptionDict, PerGameCommonOptions, \
|
||||
PlandoConnections, Range, StartInventoryPool, Toggle
|
||||
from Options import (
|
||||
Choice, DeathLinkMixin, DefaultOnToggle, ItemsAccessibility, OptionDict, OptionGroup,
|
||||
PerGameCommonOptions,
|
||||
PlandoConnections, Range, StartInventoryPool, Toggle,
|
||||
)
|
||||
from . import RANDOMIZED_CONNECTIONS
|
||||
from .portals import CHECKPOINTS, PORTALS, SHOP_POINTS
|
||||
|
||||
@@ -48,8 +51,10 @@ class Logic(Choice):
|
||||
"""
|
||||
The level of logic to use when determining what locations in your world are accessible.
|
||||
|
||||
Normal: Can require damage boosts, but otherwise approachable for someone who has beaten the game.
|
||||
Hard: Expects more knowledge and tighter execution. Has leashing, normal clips and much tighter d-boosting in logic.
|
||||
**Normal:** Can require damage boosts, but otherwise approachable for someone who has beaten the game.
|
||||
|
||||
**Hard:** Expects more knowledge and tighter execution.
|
||||
Has leashing, normal clips and much tighter d-boosting in logic.
|
||||
"""
|
||||
display_name = "Logic Level"
|
||||
option_normal = 0
|
||||
@@ -76,7 +81,10 @@ class EarlyMed(Toggle):
|
||||
|
||||
|
||||
class AvailablePortals(Range):
|
||||
"""Number of portals that are available from the start. Autumn Hills, Howling Grotto, and Glacial Peak are always available. If portal outputs are not randomized, Searing Crags will also be available."""
|
||||
"""
|
||||
Number of portals that are available from the start. Autumn Hills, Howling Grotto, and Glacial Peak are always
|
||||
available. If portal outputs are not randomized, Searing Crags will also be available.
|
||||
"""
|
||||
display_name = "Available Starting Portals"
|
||||
range_start = 3
|
||||
range_end = 6
|
||||
@@ -89,10 +97,14 @@ class ShufflePortals(Choice):
|
||||
Entering a portal from its vanilla area will always lead to HQ, and will unlock it if relevant.
|
||||
Supports plando.
|
||||
|
||||
None: Portals will take you where they're supposed to.
|
||||
Shops: Portals can lead to any area except Music Box and Elemental Skylands, with each portal output guaranteed to not overlap with another portal's. Will only put you at a portal or a shop.
|
||||
Checkpoints: Like Shops except checkpoints without shops are also valid drop points.
|
||||
Anywhere: Like Checkpoints except it's possible for multiple portals to output to the same map.
|
||||
**None:** Portals will take you where they're supposed to.
|
||||
|
||||
**Shops:** Portals can lead to any area except Music Box and Elemental Skylands, with each portal output guaranteed
|
||||
to not overlap with another portal's. Will only put you at a portal or a shop.
|
||||
|
||||
**Checkpoints:** Like Shops except checkpoints without shops are also valid drop points.
|
||||
|
||||
**Anywhere:** Like Checkpoints except it's possible for multiple portals to output to the same map.
|
||||
"""
|
||||
display_name = "Shuffle Portal Outputs"
|
||||
option_none = 0
|
||||
@@ -107,9 +119,11 @@ class ShuffleTransitions(Choice):
|
||||
Whether the transitions between the levels should be randomized.
|
||||
Supports plando.
|
||||
|
||||
None: Level transitions lead where they should.
|
||||
Coupled: Returning through a transition will take you from whence you came.
|
||||
Decoupled: Any level transition can take you to any other level transition.
|
||||
**None:** Level transitions lead where they should.
|
||||
|
||||
**Coupled:** Returning through a transition will take you from whence you came.
|
||||
|
||||
**Decoupled:** Any level transition can take you to any other level transition.
|
||||
"""
|
||||
display_name = "Shuffle Level Transitions"
|
||||
option_none = 0
|
||||
@@ -119,7 +133,10 @@ class ShuffleTransitions(Choice):
|
||||
|
||||
|
||||
class Goal(Choice):
|
||||
"""Requirement to finish the game. To win with the power seal hunt goal, you must enter the Music Box through the shop chest."""
|
||||
"""
|
||||
Requirement to finish the game.
|
||||
To win with the power seal hunt goal, you must enter the Music Box through the shop chest.
|
||||
"""
|
||||
display_name = "Goal"
|
||||
option_open_music_box = 0
|
||||
option_power_seal_hunt = 1
|
||||
@@ -132,7 +149,8 @@ class MusicBox(DefaultOnToggle):
|
||||
|
||||
class NotesNeeded(Range):
|
||||
"""
|
||||
How many notes need to be found in order to access the Music Box. 6 are always needed to enter, so this places the others in your start inventory.
|
||||
How many notes need to be found in order to access the Music Box.
|
||||
6 are always needed to enter, so this places the others in your start inventory.
|
||||
"""
|
||||
display_name = "Notes Needed"
|
||||
range_start = 1
|
||||
@@ -240,3 +258,35 @@ class MessengerOptions(DeathLinkMixin, PerGameCommonOptions):
|
||||
shop_price_plan: PlannedShopPrices
|
||||
portal_plando: PortalPlando
|
||||
plando_connections: TransitionPlando
|
||||
|
||||
|
||||
option_groups = [
|
||||
OptionGroup(
|
||||
"Difficulty",
|
||||
[
|
||||
EarlyMed,
|
||||
Logic,
|
||||
LimitedMovement,
|
||||
],
|
||||
),
|
||||
OptionGroup(
|
||||
"Goal",
|
||||
[
|
||||
Goal,
|
||||
MusicBox,
|
||||
NotesNeeded,
|
||||
AmountSeals,
|
||||
RequiredSeals,
|
||||
],
|
||||
),
|
||||
OptionGroup(
|
||||
"Entrances",
|
||||
[
|
||||
AvailablePortals,
|
||||
ShufflePortals,
|
||||
ShuffleTransitions,
|
||||
PortalPlando,
|
||||
TransitionPlando,
|
||||
],
|
||||
),
|
||||
]
|
||||
|
Reference in New Issue
Block a user