Skip to content

Commit ad07925

Browse files
remove extra.godot.id + add utility func to join namespace-name
1 parent b348d4e commit ad07925

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

loader/mod_loader.gd

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ const REQUIRED_MANIFEST_KEYS_ROOT = [
6161

6262
# Required keys in manifest's `json.extra.godot`
6363
const REQUIRED_MANIFEST_KEYS_EXTRA = [
64-
"id",
6564
"incompatibilities",
6665
"authors",
6766
"compatible_mod_loader_version",
@@ -162,7 +161,8 @@ func _init():
162161

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

168168
dev_log(str("mod_data: ", JSON.print(mod_data, ' ')), LOG_NAME)
@@ -492,7 +492,8 @@ func _init_mod(mod):
492492
dev_log(str("Loaded script -> ", mod_main_script), LOG_NAME)
493493

494494
var mod_main_instance = mod_main_script.new(self)
495-
mod_main_instance.name = mod.meta_data.extra.godot.id
495+
# mod_main_instance.name = mod.meta_data.extra.godot.id
496+
mod_main_instance.name = _get_mod_full_id(mod)
496497

497498
dev_log(str("Adding child -> ", mod_main_instance), LOG_NAME)
498499
add_child(mod_main_instance, true)
@@ -503,6 +504,12 @@ func _init_mod(mod):
503504

504505
# Util functions used in the mod loading process
505506

507+
func _get_mod_full_id(mod:Dictionary)->String:
508+
var id = mod.meta_data.extra.godot.id
509+
var namespace = mod.meta_data.namespace
510+
return str(namespace, "-", id)
511+
512+
506513
# Check if the provided command line argument was present when launching the game
507514
func _check_cmd_line_arg(argument) -> bool:
508515
for arg in OS.get_cmdline_args():

0 commit comments

Comments
 (0)