Skip to content

Commit

Permalink
Last changes before release!
Browse files Browse the repository at this point in the history
  • Loading branch information
patataofcourse committed Jul 2, 2021
1 parent 8930d37 commit 603379c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
5 changes: 3 additions & 2 deletions Roadmap.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 <s>and import</s> 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
Expand Down
12 changes: 6 additions & 6 deletions formats/puzzle.py
Original file line number Diff line number Diff line change
Expand Up @@ -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}...")
Expand All @@ -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]"
Expand All @@ -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)
Expand Down

0 comments on commit 603379c

Please sign in to comment.