Skip to content

Commit 7c70fab

Browse files
committed
refactor: ♻️ load mod config after the manifest
With this change, the config data of the `config_defaults` defined in the `config_schema` is available in the first run.
1 parent 3fb703b commit 7c70fab

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

addons/mod_loader/mod_loader.gd

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -91,10 +91,6 @@ func _load_mods() -> void:
9191
else:
9292
ModLoaderLog.info("No mods were setup", LOG_NAME)
9393

94-
# Set up mod configs. If a mod's JSON file is found, its data gets added
95-
# to mod_data.{dir_name}.config
96-
_load_mod_configs()
97-
9894
# Loop over all loaded mods via their entry in mod_data. Verify that they
9995
# have all the required files (REQUIRED_MOD_FILES), load their meta data
10096
# (from their manifest.json file), and verify that the meta JSON has all
@@ -103,6 +99,10 @@ func _load_mods() -> void:
10399
var mod: ModData = ModLoaderStore.mod_data[dir_name]
104100
mod.load_manifest()
105101

102+
# Set up mod configs. If a mod's JSON file is found, its data gets added
103+
# to mod_data.{dir_name}.config
104+
_load_mod_configs()
105+
106106
ModLoaderLog.success("DONE: Loaded all meta data", LOG_NAME)
107107

108108

0 commit comments

Comments
 (0)