From da30e080b99025b45ad72acb0d9fd9ccdb24d165 Mon Sep 17 00:00:00 2001 From: Stewie Date: Sat, 24 Sep 2022 07:33:03 -0400 Subject: [PATCH] Small changes to Tools_Executable and to SLPS update --- ToolsTOR.py | 2 +- ToolsTales_Executable.py | 35 ++++++++++++++++------------------- 2 files changed, 17 insertions(+), 20 deletions(-) diff --git a/ToolsTOR.py b/ToolsTOR.py index 440d4b9..01bdb54 100644 --- a/ToolsTOR.py +++ b/ToolsTOR.py @@ -572,7 +572,7 @@ class ToolsTOR(ToolsTales): print("Writing file %05d/%05d..." % (current - dummies, len(file_list))) #Use the new SLPS updated and update the pointers for the SCPK - with open("../Data/{}/Menu/New/SLPS_254.50".format(self.repo_name), "r+b") as output_elf: + with open("../Data/{}/Disc/New/SLPS_254.50".format(self.repo_name), "r+b") as output_elf: output_elf.seek(self.POINTERS_BEGIN) for i in range(len(sectors) - 1): diff --git a/ToolsTales_Executable.py b/ToolsTales_Executable.py index fba67bc..e4d47ce 100644 --- a/ToolsTales_Executable.py +++ b/ToolsTales_Executable.py @@ -104,7 +104,7 @@ def get_arguments(argv=None): sp_unpack.add_argument( "file", - choices=["All", "Main", "Menu", "Story", "Skits"], + choices=["All", "Init", "Main", "Menu", "Story", "Skits"], metavar="FILE", help="Options: all, dat, mfh, theirsce, scpk", ) @@ -169,6 +169,19 @@ def get_arguments(argv=None): return args +def send_xdelta(): + file_link = GoogleAPI.upload_xdelta(xdelta_name, "Stewie") #Need to add user for the folder + + message_text = """ +Hi {}, + +here is your xdelta patch : +{} +""".format('fortiersteven1@gmail.com', file_link) + + message_text = message_text + "
" + RepoFunctions.get_pull_requests_message(org, repo_name) + GoogleAPI.send_message('fortiersteven1@gmail.com', 'fortiersteven1@gmail.com', game_name + " Patch", file_link, message_text) + def hex2bytes(tales_instance, hex_value): bytes_value = bytes.fromhex(hex_value + " 00") @@ -222,32 +235,16 @@ if __name__ == "__main__": if args.action == "pack": - - - if args.file == "SLPS": #SLPS tales_instance.pack_Menu_File("../Data/Tales-Of-Rebirth/Disc/Original/SLPS_254.50") + #Generate Iso - - xdelta_name = "../Data/Tales-Of-Rebirth/Disc/New/Tales-Of-Rebirth_patch.xdelta" + xdelta_name = "../Data/Tales-Of-Rebirth/Disc/New/{}.xdelta".format(args.iso.replace(".iso","")) generate_xdelta_patch(repo_name, xdelta_name) - file_link = GoogleAPI.upload_xdelta(xdelta_name, "Stewie") #Need to add user for the folder - - message_text = """ -Hi {}, - -here is your xdelta patch : -{} -""".format('fortiersteven1@gmail.com', file_link) - - message_text = message_text + "
" + RepoFunctions.get_pull_requests_message(org, repo_name) - GoogleAPI.send_message('fortiersteven1@gmail.com', 'fortiersteven1@gmail.com', game_name + " Patch", file_link, message_text) - - if args.file == "Main":