def add_distribute_command(sub_parsers): parser: ArgumentParser = sub_parsers.add_parser( "distribute", help="Distribute pickups." ) echoes_lib.add_debug_argument(parser) echoes_lib.add_validate_argument(parser) parser.add_argument("--no-retry", default=False, action="store_true", help="Disable retries in the generation.") parser.add_argument("--status-update", default=False, action="store_true", help="Print the status updates.") group = parser.add_mutually_exclusive_group() group.add_argument("--permalink", type=str, help="The permalink to use") group.add_argument("--preset-name", type=str, help="The name of the preset to use") parser.add_argument("--game", choices=[game.value for game in RandovaniaGame], required=True, help="The name of the game of the preset to use.") parser.add_argument("--seed-number", type=int, default=0, help="If using a preset, the seed number. Defaults to 0.") parser.add_argument("--player-count", type=int, default=1, help="If using a preset, the number of players. Defaults to 1.") parser.add_argument( "output_file", type=Path, help="Where to place the seed log.") parser.set_defaults(func=distribute_command_logic)
def add_validate_command(sub_parsers): parser: ArgumentParser = sub_parsers.add_parser( "validate", help="Validate a pickup distribution.") add_debug_argument(parser) parser.add_argument("layout_file", type=Path, help="The layout seed log file to validate.") parser.set_defaults(func=validate_command_logic)
def add_distribute_command(sub_parsers): parser: ArgumentParser = sub_parsers.add_parser("distribute", help="Distribute pickups.") echoes_lib.add_debug_argument(parser) echoes_lib.add_validate_argument(parser) parser.add_argument("permalink", type=str, help="The permalink to use") parser.add_argument("output_file", type=Path, help="Where to place the seed log.") parser.set_defaults(func=distribute_command_logic)