Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix not getting mod ID from extra.godot.id in PR #27 #30

Merged
merged 1 commit into from
Jan 15, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions loader/mod_loader.gd
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ func _init():

# Instance every mod and add it as a node to the Mod Loader
for mod in mod_load_order:
mod_log(str("Initializing -> ", mod.meta_data.id), LOG_NAME)
mod_log(str("Initializing -> ", mod.meta_data.extra.godot.id), LOG_NAME)
_init_mod(mod)

dev_log(str("mod_data: ", JSON.print(mod_data, ' ')), LOG_NAME)
Expand Down Expand Up @@ -380,7 +380,7 @@ func _check_meta_file(meta_data):
missing_keys_root.erase(key)

if meta_data.has("extra") && meta_data.extra.has("godot"):
for godot_key in meta_data:
for godot_key in meta_data.extra.godot:
if(REQUIRED_MANIFEST_KEYS_EXTRA.has(godot_key)):
missing_keys_extra.erase(godot_key)

Expand Down Expand Up @@ -465,7 +465,7 @@ func _init_mod(mod):
var mod_main_script = ResourceLoader.load(mod_main_path)
dev_log(str("Loaded script -> ", mod_main_script), LOG_NAME)
var mod_main_instance = mod_main_script.new(self)
mod_main_instance.name = mod.meta_data.id
mod_main_instance.name = mod.meta_data.extra.godot.id
dev_log(str("Adding child -> ", mod_main_instance), LOG_NAME)
add_child(mod_main_instance, true)

Expand Down