Esempio n. 1
0
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)
Esempio n. 2
0
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)
Esempio n. 3
0
def add_batch_distribute_command(sub_parsers):
    parser: ArgumentParser = sub_parsers.add_parser(
        "batch-distribute", help="Generate multiple seeds in parallel")

    parser.add_argument("permalink", type=str, help="The permalink to use")
    parser.add_argument(
        "--process-count",
        type=int,
        help="How many processes to use. Defaults to CPU count.")
    parser.add_argument(
        "--timeout",
        type=int,
        default=90,
        help=
        "How many seconds to wait before timing out a generation/validation.")
    echoes_lib.add_validate_argument(parser)
    parser.add_argument("seed_count",
                        type=int,
                        help="How many seeds to generate.")
    parser.add_argument("output_dir",
                        type=Path,
                        help="Where to place the seed logs.")
    parser.set_defaults(func=batch_distribute_command_logic)