using a track filter will enable the cheat region

This commit is contained in:
Faraphel 2022-01-25 13:42:07 +01:00
parent b3d5af63ed
commit 4c5fa3f20e
3 changed files with 4 additions and 17 deletions

View file

@ -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:
"""

View file

@ -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:

View file

@ -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,