summaryrefslogtreecommitdiff
path: root/src/SMAPI/Program.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/SMAPI/Program.cs')
-rw-r--r--src/SMAPI/Program.cs8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/SMAPI/Program.cs b/src/SMAPI/Program.cs
index b5ce3033..ec841f4c 100644
--- a/src/SMAPI/Program.cs
+++ b/src/SMAPI/Program.cs
@@ -19,6 +19,7 @@ using StardewModdingAPI.Events;
using StardewModdingAPI.Framework;
using StardewModdingAPI.Framework.Exceptions;
using StardewModdingAPI.Framework.Logging;
+using StardewModdingAPI.Framework.ModData;
using StardewModdingAPI.Framework.Models;
using StardewModdingAPI.Framework.ModHelpers;
using StardewModdingAPI.Framework.ModLoading;
@@ -349,17 +350,20 @@ namespace StardewModdingAPI
if (!this.ValidateContentIntegrity())
this.Monitor.Log("SMAPI found problems in your game's content files which are likely to cause errors or crashes. Consider uninstalling XNB mods or reinstalling the game.", LogLevel.Error);
+ // load mod data
+ ModDatabase modDatabase = new ModDatabase(this.Settings.ModData);
+
// load mods
{
this.Monitor.Log("Loading mod metadata...", LogLevel.Trace);
ModResolver resolver = new ModResolver();
// load manifests
- IModMetadata[] mods = resolver.ReadManifests(Constants.ModPath, new JsonHelper(), this.Settings.ModData).ToArray();
+ IModMetadata[] mods = resolver.ReadManifests(Constants.ModPath, new JsonHelper(), modDatabase).ToArray();
resolver.ValidateManifests(mods, Constants.ApiVersion, Constants.VendorModUrls);
// process dependencies
- mods = resolver.ProcessDependencies(mods).ToArray();
+ mods = resolver.ProcessDependencies(mods, modDatabase).ToArray();
// load mods
this.LoadMods(mods, new JsonHelper(), this.ContentManager);