From 603379c216dd8a44c21828cbf851d3f69a14dfe6 Mon Sep 17 00:00:00 2001 From: patataofcourse Date: Fri, 2 Jul 2021 17:15:29 +0200 Subject: [PATCH] Last changes before release! --- Roadmap.md | 5 +++-- formats/puzzle.py | 12 ++++++------ 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/Roadmap.md b/Roadmap.md index cd8b496..b2c481e 100644 --- a/Roadmap.md +++ b/Roadmap.md @@ -5,9 +5,10 @@ - Extract BG files to PNG and create BG files from indexed PNGs - [x] 0.3 - Extract the contents of a PCM file into a folder and make a PCM file from the contents of a folder -- [ ] 0.4 +- [x] 0.4 - Replace files inside a PCM file with those given in a folder - - Extract and import files specific to a certain puzzle, for ease of puzzle editing + - Extract and import files specific to a certain puzzle, for ease of puzzle editing + + (Importing will be added to mod files on 0.5) - [ ] 0.4.1 - Make classes for BG and GDS files, so that they can be used in other commands - [ ] 0.5 diff --git a/formats/puzzle.py b/formats/puzzle.py index 73bc1b3..f59918c 100644 --- a/formats/puzzle.py +++ b/formats/puzzle.py @@ -7,9 +7,9 @@ dir_path = "/".join(os.path.dirname(os.path.realpath(__file__)).split("/")[:-1]) puzzles = json.load(open(f"{dir_path}/data/puzzles.json")) -@click.group(help="Simplify puzzle editing: extract or import the files related to a certain puzzle.",options_metavar='') -def cli(): - pass +#@click.group(help="Simplify puzzle editing: extract or import the files related to a certain puzzle.",options_metavar='') +#def cli(): +# pass def load_file(rom, out_dir, file, og_path, out_path="."): print(f"Extracting {file}...") @@ -18,8 +18,8 @@ def load_file(rom, out_dir, file, og_path, out_path="."): f.write(contents) f.close() -@cli.command( - name="extract", +@click.command( + name="puzzle", help="Extracts all the files related to a certain puzzle from the ROM into a specific directory", no_args_is_help = True, options_metavar = "[--lang]" @@ -28,7 +28,7 @@ def load_file(rom, out_dir, file, og_path, out_path="."): @click.argument("puzzle") @click.argument("out_dir") @click.option("--lang", is_flag=True, default = False, help = "Load the game titles in their original language.") -def extract(romfile, puzzle, out_dir, lang): +def cli(romfile, puzzle, out_dir, lang): romfile, id, title = rom.load(romfile, lang) try: os.mkdir(out_dir)