Skip to content

Commit 001c170

Browse files
committed
fix: 🚧 mod config loading
remove `not` from if statement, and removed the call to the original `_load_mod_configs()` function
1 parent b2bd7d4 commit 001c170

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

addons/mod_loader/classes/mod_data.gd

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ func load_mod_config() -> void:
7777
config = ModConfig.new()
7878
config.save_path = _ModLoaderPath.get_path_to_configs().plus_file("%s.json" % dir_name)
7979
config.schema = manifest.config_schema
80+
config.mod_id = dir_name
8081

8182
# Generate config_default based on the default values in config_schema
8283
_get_config_default_data(config.schema.properties)

addons/mod_loader/mod_loader.gd

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -98,16 +98,11 @@ func _load_mods() -> void:
9898
for dir_name in ModLoaderStore.mod_data:
9999
var mod: ModData = ModLoaderStore.mod_data[dir_name]
100100
mod.load_manifest()
101-
if not mod.manifest.get("config_schema") and not mod.manifest.config_schema.empty():
101+
if mod.manifest.get("config_schema") and not mod.manifest.config_schema.empty():
102102
mod.load_mod_config()
103103

104-
# Set up mod configs. If a mod's JSON file is found, its data gets added
105-
# to mod_data.{dir_name}.config
106-
_load_mod_configs()
107-
108104
ModLoaderLog.success("DONE: Loaded all meta data", LOG_NAME)
109105

110-
111106
# Check for mods with load_before. If a mod is listed in load_before,
112107
# add the current mod to the dependencies of the the mod specified
113108
# in load_before.

0 commit comments

Comments
 (0)