mirror of
https://github.com/Faraphel/Atlas-Install.git
synced 2025-07-03 11:18:26 +02:00
removed "nothread" function to use normal one instead
This commit is contained in:
parent
6304a88d95
commit
aace0e6ac0
2 changed files with 5 additions and 16 deletions
|
@ -150,10 +150,6 @@ class Game:
|
|||
self.region_ID = self.game_ID[3]
|
||||
self.region = region_id_to_name[self.region_ID] if self.region_ID in region_id_to_name else self.region
|
||||
|
||||
@in_thread
|
||||
def install_mod(self):
|
||||
self.nothread_install_mod()
|
||||
|
||||
def count_patch_subfile_operation(self) -> int:
|
||||
"""
|
||||
count all the step patching subfile will take (for the progress bar)
|
||||
|
@ -302,7 +298,7 @@ class Game:
|
|||
self.gui.progress(statut=self.gui.translate("Converting to", " ", output_format), add=1)
|
||||
self.convert_to(output_format)
|
||||
|
||||
def nothread_install_mod(self) -> None:
|
||||
def install_mod(self) -> None:
|
||||
"""
|
||||
Patch the game to install the mod
|
||||
"""
|
||||
|
@ -423,11 +419,7 @@ class Game:
|
|||
finalise(f"./file/Common_{bmglang}.txt", bmgcommon)
|
||||
finalise(f"./file/Common_R{bmglang}.txt", rbmgcommon)
|
||||
|
||||
@in_thread
|
||||
def patch_file(self):
|
||||
self.nothread_patch_file()
|
||||
|
||||
def nothread_patch_file(self):
|
||||
"""
|
||||
Prepare all files to install the mod (track, bmg text, descriptive image, ...)
|
||||
"""
|
||||
|
|
|
@ -184,10 +184,7 @@ class Gui:
|
|||
self.frame_game_path_action.grid(row=2, column=1, columnspan=2, sticky="NEWS")
|
||||
self.frame_game_path_action.columnconfigure(1, weight=1)
|
||||
|
||||
@in_thread
|
||||
def use_path(): nothread_use_path()
|
||||
|
||||
def nothread_use_path():
|
||||
def use_path():
|
||||
try:
|
||||
game_path = entry_game_path.get()
|
||||
if not os.path.exists(game_path): raise InvalidGamePath
|
||||
|
@ -213,9 +210,9 @@ class Gui:
|
|||
|
||||
@in_thread
|
||||
def do_everything():
|
||||
nothread_use_path()
|
||||
self.game.nothread_patch_file()
|
||||
self.game.nothread_install_mod()
|
||||
use_path()
|
||||
self.game.patch_file()
|
||||
self.game.install_mod()
|
||||
|
||||
self.button_do_everything = Button(self.frame_game_path_action, text=self.translate("Install mod"), relief=RIDGE, command=do_everything)
|
||||
self.button_do_everything.grid(row=1, column=1, columnspan=2, sticky="NEWS")
|
||||
|
|
Loading…
Reference in a new issue