From bb59d1dc18b38bbddfb53710d4d4d3f9e0e8be22 Mon Sep 17 00:00:00 2001 From: Faraphel Date: Thu, 26 Aug 2021 11:34:25 +0200 Subject: [PATCH] removed a old useless condition stopping the patch_file process if patch_tracks failed (not return 0), which can't happen since patch_track could only return 0 --- source/Game.py | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/source/Game.py b/source/Game.py index 7088c43..75b9580 100644 --- a/source/Game.py +++ b/source/Game.py @@ -58,9 +58,9 @@ class NoGui: def get(self): return self.value - def progress(self, *args, **kwargs): print(args, kwargs) - def translate(self, *args, **kwargs): return "" - def log_error(self, *args, **kwargs): print(args, kwargs) + def progress(*args, **kwargs): print(args, kwargs) + def translate(*args, **kwargs): return "" + def log_error(*args, **kwargs): print(args, kwargs) is_dev_version = False button_install_mod = NoButton() @@ -377,7 +377,7 @@ class Game: for file in glob.glob(self.path + "/files/Scene/UI/MenuSingle_?.szs"): self.patch_bmg(file) # MenuSingle could be any other file, Common and Menu are all the same in all other files. self.patch_autoadd() - if self.patch_tracks() != 0: return + self.patch_tracks() self.gui.button_install_mod.grid(row=2, column=1, columnspan=2, sticky="NEWS") self.gui.button_install_mod.config( @@ -423,11 +423,9 @@ class Game: new_4_3.paste(img_lang_4_3, (0, 0), img_lang_4_3) new_4_3.save(dest_dir + f"/strapA_608x456{get_filename(get_nodir(file_lang))}.png") - - def patch_tracks(self) -> int: + def patch_tracks(self) -> None: """ Download track's wu8 file and convert them to szs - :return: 0 if no error occured """ max_process = self.gui.intvar_process_track.get() thread_list = {} @@ -500,5 +498,3 @@ class Game: clean_process() while clean_process() != 1: pass # End the process if all process ended - - return 0