From 4c5fa3f20e8c5b435cad223ac14897a533aaa819 Mon Sep 17 00:00:00 2001 From: Faraphel Date: Tue, 25 Jan 2022 13:42:07 +0100 Subject: [PATCH] using a track filter will enable the cheat region --- source/Game.py | 6 +----- source/Gui/Main.py | 14 ++------------ source/Gui/TrackSelection.py | 1 + 3 files changed, 4 insertions(+), 17 deletions(-) diff --git a/source/Game.py b/source/Game.py index faca991..0086488 100644 --- a/source/Game.py +++ b/source/Game.py @@ -552,11 +552,7 @@ class Game: :param track: the track that will be patched :return: 0 if no error occured """ - nonlocal error_count, error_max, thread_list - - try: track.convert_wu8_to_szs() - except Exception as e: - raise e + track.convert_wu8_to_szs() def clean_process() -> int: """ diff --git a/source/Gui/Main.py b/source/Gui/Main.py index 5543763..6cc8063 100644 --- a/source/Gui/Main.py +++ b/source/Gui/Main.py @@ -37,6 +37,7 @@ class Main: self.quit() self.is_dev_version = False # Is this installer version a dev ? + self.is_track_configuration_edited = False self.stringvar_ctconfig = StringVar(value=self.available_packs[0]) self.stringvar_language = StringVar(value=self.common.option.language) self.stringvar_game_format = StringVar(value=self.common.option.format) @@ -45,12 +46,6 @@ class Main: self.root.title(self.translate("MKWFaraphel Installer")) - self.boolvar_use_1star_track = BooleanVar(value=True) - self.boolvar_use_2star_track = BooleanVar(value=True) - self.boolvar_use_3star_track = BooleanVar(value=True) - self.stringvar_mark_track_from_version = StringVar(value="None") - self.stringvar_sort_track_by = StringVar(value="name") - self.boolvar_use_debug_mode = BooleanVar(value=False) self.boolvar_force_unofficial_mode = BooleanVar(value=False) @@ -424,13 +419,8 @@ class Main: :return: True if the parameter is the official one, False if it is customized """ return ( - self.boolvar_use_1star_track.get() is True and - self.boolvar_use_2star_track.get() is True and - self.boolvar_use_3star_track.get() is True and - self.boolvar_force_unofficial_mode.get() is False and - - self.stringvar_sort_track_by.get() == "name" + self.is_track_configuration_edited is False ) def quit(self) -> None: diff --git a/source/Gui/TrackSelection.py b/source/Gui/TrackSelection.py index 1feab62..01908b8 100644 --- a/source/Gui/TrackSelection.py +++ b/source/Gui/TrackSelection.py @@ -218,6 +218,7 @@ class TrackSelection: ).grid(row=100, column=1, sticky="E") def save_configuration(self): + self.common.gui_main.is_track_configuration_edited = True self.common.ct_config.sort_track_attr = self.combobox_track_sort.get() self.common.ct_config.filter_track_selection = self.get_filter( self.variable_enable_track_filter,