Skip to content

Commit

Permalink
Add mod to loaded mods before executing patches or assemblies
Browse files Browse the repository at this point in the history
  • Loading branch information
Carnagion committed Aug 17, 2022
1 parent 99b8e48 commit 6f97917
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions Modding/ModLoader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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;
}

Expand Down

0 comments on commit 6f97917

Please sign in to comment.