Fixed issue with shuffling Ganon/GT via CLI

This commit is contained in:
codemann8
2021-10-31 15:57:32 -05:00
parent 0b5c1e70ae
commit e2afe98b75
3 changed files with 18 additions and 12 deletions

View File

@@ -318,6 +318,10 @@ def update_deprecated_args(args):
if args: if args:
argVars = vars(args) argVars = vars(args)
truthy = [1, True, "True", "true"] truthy = [1, True, "True", "true"]
if "multi" in argVars:
players = int(args.multi)
else:
players = 1
# Hints default to FALSE # Hints default to FALSE
# Don't do: Yes # Don't do: Yes
# Do: No # Do: No
@@ -354,12 +358,14 @@ def update_deprecated_args(args):
# Shuffle Ganon defaults to TRUE # Shuffle Ganon defaults to TRUE
# Don't do: Yes # Don't do: Yes
# Do: No # Do: No
if "no_shuffleganon" in argVars: orig_shuffleganon = args.shuffleganon
args.shuffleganon = not args.no_shuffleganon in truthy if isinstance(orig_shuffleganon, bool):
# Don't do: No args.shuffleganon = {}
# Do: Yes for player in range(1, players + 1):
if "shuffleganon" in argVars: args.shuffleganon[player] = orig_shuffleganon
args.no_shuffleganon = not args.shuffleganon in truthy for player in range(1, players + 1):
if "no_shuffleganon" in argVars:
args.shuffleganon[player] = not args.no_shuffleganon in truthy
# Playthrough defaults to TRUE # Playthrough defaults to TRUE
# Don't do: Yes # Don't do: Yes

View File

@@ -359,12 +359,12 @@
}, },
"shuffleganon": { "shuffleganon": {
"action": "store_false", "action": "store_false",
"type": "bool" "type": "bool",
"help": "suppress"
}, },
"no_shuffleganon": { "no_shuffleganon": {
"action": "store_true", "action": "store_true",
"dest": "shuffleganon", "dest": "shuffleganon"
"help": "suppress"
}, },
"shufflelinks": { "shufflelinks": {
"action": "store_true", "action": "store_true",

View File

@@ -301,7 +301,7 @@
"Keys are universal, shooting arrows costs rupees,", "Keys are universal, shooting arrows costs rupees,",
"and a few other little things make this more like Zelda-1. (default: %(default)s)" "and a few other little things make this more like Zelda-1. (default: %(default)s)"
], ],
"pseudoboots": [ " Players starts with pseudo boots that allow dashing but no item checks (default: %(default)s"], "pseudoboots": [ " Players starts with pseudo boots that allow dashing but no item checks (default: %(default)s)"],
"bombbag": ["Start with 0 bomb capacity. Two capacity upgrades (+10) are added to the pool (default: %(default)s)" ], "bombbag": ["Start with 0 bomb capacity. Two capacity upgrades (+10) are added to the pool (default: %(default)s)" ],
"startinventory": [ "Specifies a list of items that will be in your starting inventory (separated by commas). (default: %(default)s)" ], "startinventory": [ "Specifies a list of items that will be in your starting inventory (separated by commas). (default: %(default)s)" ],
"usestartinventory": [ "Toggle usage of Starting Inventory." ], "usestartinventory": [ "Toggle usage of Starting Inventory." ],
@@ -315,8 +315,8 @@
"None: You will be able to reach enough locations to beat the game." "None: You will be able to reach enough locations to beat the game."
], ],
"hints": [ "Make telepathic tiles and storytellers give helpful hints. (default: %(default)s)" ], "hints": [ "Make telepathic tiles and storytellers give helpful hints. (default: %(default)s)" ],
"shuffleganon": [ "no_shuffleganon": [
"Include the Ganon's Tower and Pyramid Hole in the", "Don't include the Ganon's Tower and Pyramid Hole in the",
"entrance shuffle pool. (default: %(default)s)" "entrance shuffle pool. (default: %(default)s)"
], ],
"shufflelinks": [ "shufflelinks": [