@@ -118,10 +118,16 @@ var ml_options: ModLoaderOptionsProfile
118118func _init ():
119119 _update_ml_options_from_options_resource ()
120120 _update_ml_options_from_cli_args ()
121+ _configure_logger ()
121122 # ModLoaderStore is passed as argument so the cache data can be loaded on _init()
122123 _ModLoaderCache .init_cache (self )
123124
124125
126+ func _exit_tree () -> void :
127+ # Save the cache to the cache file.
128+ _ModLoaderCache .save_to_file ()
129+
130+
125131# Update ModLoader's options, via the custom options resource
126132func _update_ml_options_from_options_resource () -> void :
127133 # Path to the options resource
@@ -178,11 +184,6 @@ func _update_ml_options_from_options_resource() -> void:
178184 ml_options = override_options
179185
180186
181- func _exit_tree () -> void :
182- # Save the cache to the cache file.
183- _ModLoaderCache .save_to_file ()
184-
185-
186187# Update ModLoader's options, via CLI args
187188func _update_ml_options_from_cli_args () -> void :
188189 # Disable mods
@@ -217,3 +218,10 @@ func _update_ml_options_from_cli_args() -> void:
217218 var ignore_mod_names := _ModLoaderCLI .get_cmd_line_arg_value ("--log-ignore" )
218219 if not ignore_mod_names == "" :
219220 ml_options .ignored_mod_names_in_log = ignore_mod_names .split ("," )
221+
222+
223+ # Update static variables from the options
224+ func _configure_logger () -> void :
225+ ModLoaderLog .verbosity = ml_options .log_level
226+ ModLoaderLog .ignored_mods = ml_options .ignored_mod_names_in_log
227+ ModLoaderLog .hint_color = ml_options .hint_color
0 commit comments