refactor(clew): pass extracted output to object dump
This commit is contained in:
@@ -134,12 +134,7 @@ def run_renpy_object_dump(game_root: Path, script: Path, output: Path) -> None:
|
|||||||
subprocess.run(command, check=True)
|
subprocess.run(command, check=True)
|
||||||
|
|
||||||
|
|
||||||
def dump_renpy_objects(output_root: Path, overwrite: bool) -> None:
|
def dump_renpy_objects(output_root: Path, extracted_root: Path, overwrite: bool) -> None:
|
||||||
extracted_root = output_root / "extracted"
|
|
||||||
if not extracted_root.is_dir():
|
|
||||||
LOG.critical("extracted output directory does not exist: %s", extracted_root)
|
|
||||||
raise SystemExit(2)
|
|
||||||
|
|
||||||
game_roots = find_game_roots(extracted_root)
|
game_roots = find_game_roots(extracted_root)
|
||||||
if not game_roots:
|
if not game_roots:
|
||||||
LOG.warning("no Ren'Py game roots found under %s", extracted_root)
|
LOG.warning("no Ren'Py game roots found under %s", extracted_root)
|
||||||
@@ -170,7 +165,7 @@ def run(args: argparse.Namespace) -> None:
|
|||||||
extract_game_files(game_root, extracted)
|
extract_game_files(game_root, extracted)
|
||||||
|
|
||||||
if not args.no_renpy_object_dump:
|
if not args.no_renpy_object_dump:
|
||||||
dump_renpy_objects(output_root, args.overwrite)
|
dump_renpy_objects(output_root, extracted, args.overwrite)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|||||||
Reference in New Issue
Block a user