# main launch import helpers.utils as utils import helpers.status as status import helpers.index as index import helpers.textmap as textmap import sys import argparse from rich import print from rich.rule import Rule if __name__ == "__main__": print(Rule("Anime Game Data Maker")) parser = argparse.ArgumentParser() parser.add_argument("-s", "--status", dest="status", action="store_true", help="show the status of the tool") parser.add_argument("-st", "--set_target", type=str, dest="gameTarget", help="set game target, eg: --st 5.0") parser.add_argument("-bi", "--build_index", dest="buildIndex", action="store_true", help="build the index file") parser.add_argument("-blk", "--copy_blocks", dest="copyBlocks", action="store_true", help="automatically copy the blk files from the game") parser.add_argument("-tm", "--text_map", dest="textMap", action="store_true", help="build the text maps") args = parser.parse_args() if len(sys.argv) < 2: parser.print_help(sys.stderr) sys.exit(1) if args.status: status.print_status() exit() if args.gameTarget: utils.set_config("gameTarget", args.gameTarget) maxTarget = utils.get_config("mapHelperTarget") if args.gameTarget > maxTarget: print(f"[bold red]Warning, your game target (v{args.gameTarget}) is higher than the latest supported version (v{maxTarget})[/bold red]") print(f"[bold]Defined game target to [blue]v{args.gameTarget}[/blue] ![/bold]") if args.buildIndex: index.extract_asset_index() exit() if args.textMap: textmap.extract_text_maps(["FR"]) # TODO: all languages exit()