Templates: Remove auto wordwrap, fix manual indentation, and reformat docstrings for world options in main. (#1201)

* Fix wrapping too early if docstring is within 120 characters and re-indent other lines.

* Remove auto-word wrapping and tweaked all worlds' option docstrings formatting.

Options should wrap around the 120 character mark to prevent template files from being too long horizontally. This also allows manual-indentation to work again.

* Fix missing '#' on empty lines in output from docstring.
This commit is contained in:
Zach Parks
2022-11-06 08:28:16 -06:00
committed by GitHub
parent d10bb3c6c1
commit 462ddce72c
13 changed files with 142 additions and 82 deletions

View File

@@ -208,7 +208,8 @@ class navi_color_default_inner(Choice):
class navi_color_default_outer(Choice):
"""Choose a color. "random_choice" selects a random option. "completely_random" generates a random hex code. "match_inner" copies the inner color for this option."""
"""Choose a color. "random_choice" selects a random option. "completely_random" generates a random hex code.
"match_inner" copies the inner color for this option."""
display_name = "Navi Idle Outer"
option_random_choice = 0
option_completely_random = 1
@@ -265,7 +266,8 @@ class navi_color_enemy_inner(Choice):
class navi_color_enemy_outer(Choice):
"""Choose a color. "random_choice" selects a random option. "completely_random" generates a random hex code. "match_inner" copies the inner color for this option."""
"""Choose a color. "random_choice" selects a random option. "completely_random" generates a random hex code.
"match_inner" copies the inner color for this option."""
display_name = "Navi Targeting Enemy Outer"
option_random_choice = 0
option_completely_random = 1
@@ -322,7 +324,8 @@ class navi_color_npc_inner(Choice):
class navi_color_npc_outer(Choice):
"""Choose a color. "random_choice" selects a random option. "completely_random" generates a random hex code. "match_inner" copies the inner color for this option."""
"""Choose a color. "random_choice" selects a random option. "completely_random" generates a random hex code.
"match_inner" copies the inner color for this option."""
display_name = "Navi Targeting NPC Outer"
option_random_choice = 0
option_completely_random = 1
@@ -379,7 +382,8 @@ class navi_color_prop_inner(Choice):
class navi_color_prop_outer(Choice):
"""Choose a color. "random_choice" selects a random option. "completely_random" generates a random hex code. "match_inner" copies the inner color for this option."""
"""Choose a color. "random_choice" selects a random option. "completely_random" generates a random hex code.
"match_inner" copies the inner color for this option."""
display_name = "Navi Targeting Prop Outer"
option_random_choice = 0
option_completely_random = 1
@@ -427,7 +431,8 @@ class sword_trail_color_inner(Choice):
class sword_trail_color_outer(Choice):
"""Choose a color. "random_choice" selects a random option. "completely_random" generates a random hex code. "match_inner" copies the inner color for this option."""
"""Choose a color. "random_choice" selects a random option. "completely_random" generates a random hex code.
"match_inner" copies the inner color for this option."""
display_name = "Sword Trail Outer"
option_random_choice = 0
option_completely_random = 1
@@ -465,7 +470,8 @@ class bombchu_trail_color_inner(Choice):
class bombchu_trail_color_outer(Choice):
"""Choose a color. "random_choice" selects a random option. "completely_random" generates a random hex code. "match_inner" copies the inner color for this option."""
"""Choose a color. "random_choice" selects a random option. "completely_random" generates a random hex code.
"match_inner" copies the inner color for this option."""
display_name = "Bombchu Trail Outer"
option_random_choice = 0
option_completely_random = 1
@@ -503,7 +509,8 @@ class boomerang_trail_color_inner(Choice):
class boomerang_trail_color_outer(Choice):
"""Choose a color. "random_choice" selects a random option. "completely_random" generates a random hex code. "match_inner" copies the inner color for this option."""
"""Choose a color. "random_choice" selects a random option. "completely_random" generates a random hex code.
"match_inner" copies the inner color for this option."""
display_name = "Boomerang Trail Outer"
option_random_choice = 0
option_completely_random = 1
@@ -646,7 +653,8 @@ class start_button_color(Choice):
class sfx_navi_overworld(Choice):
"""Choose a sound effect. "random_choice" selects a random option. "random_ear_safe" selects a random safe option. "completely_random" selects any random sound."""
"""Choose a sound effect. "random_choice" selects a random option. "random_ear_safe" selects a random safe option.
"completely_random" selects any random sound."""
display_name = "Navi Overworld"
option_default = 0
option_completely_random = 1
@@ -685,7 +693,8 @@ class sfx_navi_overworld(Choice):
class sfx_navi_enemy(Choice):
"""Choose a sound effect. "random_choice" selects a random option. "random_ear_safe" selects a random safe option. "completely_random" selects any random sound."""
"""Choose a sound effect. "random_choice" selects a random option. "random_ear_safe" selects a random safe option.
"completely_random" selects any random sound."""
display_name = "Navi Enemy"
option_default = 0
option_completely_random = 1
@@ -724,7 +733,8 @@ class sfx_navi_enemy(Choice):
class sfx_low_hp(Choice):
"""Choose a sound effect. "random_choice" selects a random option. "random_ear_safe" selects a random safe option. "completely_random" selects any random sound."""
"""Choose a sound effect. "random_choice" selects a random option. "random_ear_safe" selects a random safe option.
"completely_random" selects any random sound."""
display_name = "Low HP"
option_default = 0
option_completely_random = 1
@@ -761,7 +771,8 @@ class sfx_low_hp(Choice):
class sfx_menu_cursor(Choice):
"""Choose a sound effect. "random_choice" selects a random option. "random_ear_safe" selects a random safe option. "completely_random" selects any random sound."""
"""Choose a sound effect. "random_choice" selects a random option. "random_ear_safe" selects a random safe option.
"completely_random" selects any random sound."""
display_name = "Menu Cursor"
option_default = 0
option_completely_random = 1
@@ -833,7 +844,8 @@ class sfx_menu_cursor(Choice):
class sfx_menu_select(Choice):
"""Choose a sound effect. "random_choice" selects a random option. "random_ear_safe" selects a random safe option. "completely_random" selects any random sound."""
"""Choose a sound effect. "random_choice" selects a random option. "random_ear_safe" selects a random safe option.
"completely_random" selects any random sound."""
display_name = "Menu Select"
option_default = 0
option_completely_random = 1
@@ -907,7 +919,8 @@ class sfx_menu_select(Choice):
class sfx_nightfall(Choice):
"""Choose a sound effect. "random_choice" selects a random option. "random_ear_safe" selects a random safe option. "completely_random" selects any random sound."""
"""Choose a sound effect. "random_choice" selects a random option. "random_ear_safe" selects a random safe option.
"completely_random" selects any random sound."""
display_name = "Nightfall"
option_default = 0
option_completely_random = 1
@@ -926,7 +939,8 @@ class sfx_nightfall(Choice):
class sfx_horse_neigh(Choice):
"""Choose a sound effect. "random_choice" selects a random option. "random_ear_safe" selects a random safe option. "completely_random" selects any random sound."""
"""Choose a sound effect. "random_choice" selects a random option. "random_ear_safe" selects a random safe option.
"completely_random" selects any random sound."""
display_name = "Horse"
option_default = 0
option_completely_random = 1
@@ -945,7 +959,8 @@ class sfx_horse_neigh(Choice):
class sfx_hover_boots(Choice):
"""Choose a sound effect. "random_choice" selects a random option. "random_ear_safe" selects a random safe option. "completely_random" selects any random sound."""
"""Choose a sound effect. "random_choice" selects a random option. "random_ear_safe" selects a random safe option.
"completely_random" selects any random sound."""
display_name = "Hover Boots"
option_default = 0
option_completely_random = 1

View File

@@ -121,7 +121,8 @@ class StartingAge(Choice):
class InteriorEntrances(Choice):
"""Shuffles interior entrances. "Simple" shuffles houses and Great Fairies; "All" includes Windmill, Link's House, Temple of Time, and Kak potion shop."""
"""Shuffles interior entrances. "Simple" shuffles houses and Great Fairies; "All" includes Windmill, Link's House,
Temple of Time, and Kak potion shop."""
display_name = "Shuffle Interior Entrances"
option_off = 0
option_simple = 1
@@ -160,7 +161,8 @@ class SpawnPositions(Toggle):
class MixEntrancePools(Choice):
"""Shuffles entrances into a mixed pool instead of separate ones. "indoor" keeps overworld entrances separate; "all" mixes them in."""
"""Shuffles entrances into a mixed pool instead of separate ones. "indoor" keeps overworld entrances separate; "all"
mixes them in."""
display_name = "Mix Entrance Pools"
option_off = 0
option_indoor = 1
@@ -168,7 +170,8 @@ class MixEntrancePools(Choice):
class DecoupleEntrances(Toggle):
"""Decouple entrances when shuffling them. Also adds the one-way entrance from Gerudo Valley to Lake Hylia if overworld is shuffled."""
"""Decouple entrances when shuffling them. Also adds the one-way entrance from Gerudo Valley to Lake Hylia if
overworld is shuffled."""
display_name = "Decouple Entrances"
@@ -186,7 +189,8 @@ class TriforceGoal(Range):
class ExtraTriforces(Range):
"""Percentage of additional Triforce pieces in the pool. With high numbers, you may need to randomize additional locations to have enough items."""
"""Percentage of additional Triforce pieces in the pool. With high numbers, you may need to randomize additional
locations to have enough items."""
display_name = "Percentage of Extra Triforce Pieces"
range_start = 0
range_end = 100
@@ -194,7 +198,8 @@ class ExtraTriforces(Range):
class LogicalChus(Toggle):
"""Bombchus are properly considered in logic. The first found pack will have 20 chus; Kokiri Shop and Bazaar sell refills; bombchus open Bombchu Bowling."""
"""Bombchus are properly considered in logic. The first found pack will have 20 chus; Kokiri Shop and Bazaar sell
refills; bombchus open Bombchu Bowling."""
display_name = "Bombchus Considered in Logic"
@@ -525,7 +530,8 @@ class CompleteMaskQuest(Toggle):
class UsefulCutscenes(Toggle):
"""Reenables the Poe cutscene in Forest Temple, Darunia in Fire Temple, and Twinrova introduction. Mostly useful for glitched."""
"""Reenables the Poe cutscene in Forest Temple, Darunia in Fire Temple, and Twinrova introduction. Mostly useful for
glitched."""
display_name = "Enable Useful Cutscenes"
@@ -846,8 +852,10 @@ sfx_options: typing.Dict[str, type(Option)] = {
class LogicTricks(OptionList):
"""Set various tricks for logic in Ocarina of Time.
Format as a comma-separated list of "nice" names: ["Fewer Tunic Requirements", "Hidden Grottos without Stone of Agony"].
A full list of supported tricks can be found at https://github.com/ArchipelagoMW/Archipelago/blob/main/worlds/oot/LogicTricks.py"""
Format as a comma-separated list of "nice" names: ["Fewer Tunic Requirements", "Hidden Grottos without Stone of Agony"].
A full list of supported tricks can be found at:
https://github.com/ArchipelagoMW/Archipelago/blob/main/worlds/oot/LogicTricks.py
"""
display_name = "Logic Tricks"
valid_keys = frozenset(normalized_name_tricks)
valid_keys_casefold = True