Skip to content

Commit 6f97917

Browse files
author
Carnagion
committed
Add mod to loaded mods before executing patches or assemblies
1 parent 99b8e48 commit 6f97917

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

Modding/ModLoader.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ public static Mod LoadMod(string modDirectoryPath, bool executeAssemblies = true
4040
{
4141
// Load mod
4242
Mod mod = new(Mod.Metadata.Load(modDirectoryPath));
43+
ModLoader.loadedMods.Add(mod.Meta.Id, mod);
4344

4445
// Cache XML data of loaded mods for repeat enumeration later
4546
XmlElement[] data = ModLoader.LoadedMods.Values
@@ -57,9 +58,6 @@ public static Mod LoadMod(string modDirectoryPath, bool executeAssemblies = true
5758
ModLoader.StartupMod(mod);
5859
}
5960

60-
// Register mod as fully loaded
61-
ModLoader.loadedMods.Add(mod.Meta.Id, mod);
62-
6361
return mod;
6462
}
6563

0 commit comments

Comments
 (0)