Add Suppress Spoiler

This commit is contained in:
Mike A. Trethewey
2020-03-23 21:39:45 -07:00
parent 0b8014b9b4
commit ff678659f9
6 changed files with 19 additions and 4 deletions

1
CLI.py
View File

@@ -156,6 +156,7 @@ def parse_settings():
"ow_palettes": "default", "ow_palettes": "default",
"uw_palettes": "default", "uw_palettes": "default",
"suppress_spoiler": True,
"create_spoiler": False, "create_spoiler": False,
"skip_playthrough": False, "skip_playthrough": False,
"calc_playthrough": True, "calc_playthrough": True,

View File

@@ -251,6 +251,15 @@ def print_wiki_doors_by_region(d_regions, world, player):
def update_deprecated_args(args): def update_deprecated_args(args):
argVars = vars(args) argVars = vars(args)
truthy = [ 1, True, "True", "true" ] truthy = [ 1, True, "True", "true" ]
# Don't do: Yes
# Do: No
if "suppress_spoiler" in argVars:
args.create_spoiler = args.suppress_spoiler not in truthy
# Don't do: No
# Do: Yes
if "create_spoiler" in argVars:
args.suppress_spoiler = not args.create_spoiler in truthy
# Don't do: Yes # Don't do: Yes
# Do: No # Do: No
if "suppress_rom" in argVars: if "suppress_rom" in argVars:

View File

@@ -1,9 +1,14 @@
{ {
"lang": {}, "lang": {},
"create_spoiler": { "create_spoiler": {
"action": "store_true", "action": "store_false",
"type": "bool" "type": "bool"
}, },
"suppress_spoiler": {
"action": "store_true",
"dest": "create_spoiler",
"help": "suppress"
},
"logic": { "logic": {
"choices": [ "choices": [
"noglitches", "noglitches",

View File

@@ -154,7 +154,7 @@
"randomizer.gameoptions.sprite.unchanged": "(unchanged)", "randomizer.gameoptions.sprite.unchanged": "(unchanged)",
"randomizer.generation.spoiler": "Create Spoiler Log", "randomizer.generation.createspoiler": "Create Spoiler Log",
"randomizer.generation.createrom": "Create Patched ROM", "randomizer.generation.createrom": "Create Patched ROM",
"randomizer.generation.calcplaythrough": "Calculate Playthrough", "randomizer.generation.calcplaythrough": "Calculate Playthrough",
"randomizer.generation.usestartinventory": "Use Starting Inventory", "randomizer.generation.usestartinventory": "Use Starting Inventory",

View File

@@ -1,6 +1,6 @@
{ {
"checkboxes": { "checkboxes": {
"spoiler": { "type": "checkbox" }, "createspoiler": { "type": "checkbox" },
"createrom": { "type": "checkbox" }, "createrom": { "type": "checkbox" },
"calcplaythrough": { "type": "checkbox" }, "calcplaythrough": { "type": "checkbox" },
"usestartinventory": { "type": "checkbox" }, "usestartinventory": { "type": "checkbox" },

View File

@@ -101,7 +101,7 @@ SETTINGSTOPROCESS = {
"uwpalettes": "uw_palettes" "uwpalettes": "uw_palettes"
}, },
"generation": { "generation": {
"spoiler": "create_spoiler", "createspoiler": "create_spoiler",
"createrom": "create_rom", "createrom": "create_rom",
"calcplaythrough": "calc_playthrough", "calcplaythrough": "calc_playthrough",
"usestartinventory": "usestartinventory", "usestartinventory": "usestartinventory",