diff --git a/Modding/ModLoader.cs b/Modding/ModLoader.cs index 6bac94d..9396a5d 100644 --- a/Modding/ModLoader.cs +++ b/Modding/ModLoader.cs @@ -40,6 +40,7 @@ public static Mod LoadMod(string modDirectoryPath, bool executeAssemblies = true { // Load mod Mod mod = new(Mod.Metadata.Load(modDirectoryPath)); + ModLoader.loadedMods.Add(mod.Meta.Id, mod); // Cache XML data of loaded mods for repeat enumeration later XmlElement[] data = ModLoader.LoadedMods.Values @@ -57,9 +58,6 @@ public static Mod LoadMod(string modDirectoryPath, bool executeAssemblies = true ModLoader.StartupMod(mod); } - // Register mod as fully loaded - ModLoader.loadedMods.Add(mod.Meta.Id, mod); - return mod; }