Skip to content

Commit 84a374d

Browse files
authored
fix: 🐛 added get_mod_data_all() (#274)
and updated the deprecation message to point to `ModLoaderMod.get_mod_data_all()` instead of `ModLoaderMod.get_mod_data()`.
1 parent 3da42cb commit 84a374d

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

addons/mod_loader/api/mod.gd

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,11 @@ static func get_mod_data(mod_id: String) -> ModData:
110110
return ModLoaderStore.mod_data[mod_id]
111111

112112

113+
# Gets the ModData of all loaded Mods as Dictionary.
114+
static func get_mod_data_all() -> Dictionary:
115+
return ModLoaderStore.mod_data
116+
117+
113118
# Returns true if the mod with the given mod_id was successfully loaded.
114119
static func is_mod_loaded(mod_id: String) -> bool:
115120
if ModLoaderStore.is_initializing:

addons/mod_loader/mod_loader.gd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -389,5 +389,5 @@ func deprecated_direct_access_UNPACKED_DIR() -> String:
389389

390390

391391
func deprecated_direct_access_mod_data() -> Dictionary:
392-
ModLoaderDeprecated.deprecated_message("The var \"mod_data\" was removed, use \"ModLoaderMod.get_mod_data()\" instead", "6.0.0")
392+
ModLoaderDeprecated.deprecated_message("The var \"mod_data\" was removed, use \"ModLoaderMod.get_mod_data_all()\" instead", "6.0.0")
393393
return ModLoaderStore.mod_data

0 commit comments

Comments
 (0)