diff options
author | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2022-11-11 01:22:46 -0500 |
---|---|---|
committer | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2022-11-11 01:22:46 -0500 |
commit | dbf7750f3e27cf7c50e2f06005fd14da95627dc3 (patch) | |
tree | ab8995292696e391208cac96c2eae2830ea6b27c /src/SMAPI | |
parent | 3059794622e4442bf289dde7b4f533d8021d3bf7 (diff) | |
download | SMAPI-dbf7750f3e27cf7c50e2f06005fd14da95627dc3.tar.gz SMAPI-dbf7750f3e27cf7c50e2f06005fd14da95627dc3.tar.bz2 SMAPI-dbf7750f3e27cf7c50e2f06005fd14da95627dc3.zip |
only validate & apply custom load order if there is one
Diffstat (limited to 'src/SMAPI')
-rw-r--r-- | src/SMAPI/Framework/SCore.cs | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/SMAPI/Framework/SCore.cs b/src/SMAPI/Framework/SCore.cs index 7f564a28..be5bc40f 100644 --- a/src/SMAPI/Framework/SCore.cs +++ b/src/SMAPI/Framework/SCore.cs @@ -423,7 +423,11 @@ namespace StardewModdingAPI.Framework this.Monitor.Log($" Skipped {mod.GetRelativePathWithRoot()} (folder name starts with a dot)."); mods = mods.Where(p => !p.IsIgnored).ToArray(); - // warn about mods that should load early or late which are not found at all, or both + // validate manifests + resolver.ValidateManifests(mods, Constants.ApiVersion, toolkit.GetUpdateUrl, getFileLookup: this.GetFileLookup); + + // apply load order customizations + if (this.Settings.ModsToLoadEarly.Any() || this.Settings.ModsToLoadLate.Any()) { HashSet<string> installedIds = new HashSet<string>(mods.Select(p => p.Manifest.UniqueID), StringComparer.OrdinalIgnoreCase); @@ -437,11 +441,11 @@ namespace StardewModdingAPI.Framework this.Monitor.Log($" The 'smapi-internal/config.json' file lists mod IDs in {nameof(this.Settings.ModsToLoadLate)} which aren't installed: '{string.Join("', '", missingLateMods)}'.", LogLevel.Warn); if (duplicateMods.Any()) this.Monitor.Log($" The 'smapi-internal/config.json' file lists mod IDs which are in both {nameof(this.Settings.ModsToLoadEarly)} and {nameof(this.Settings.ModsToLoadLate)}: '{string.Join("', '", duplicateMods)}'. These will be loaded early.", LogLevel.Warn); + + mods = resolver.ApplyLoadOrderOverrides(mods, this.Settings.ModsToLoadEarly, this.Settings.ModsToLoadLate); } // load mods - resolver.ValidateManifests(mods, Constants.ApiVersion, toolkit.GetUpdateUrl, getFileLookup: this.GetFileLookup); - mods = resolver.ApplyLoadOrderOverrides(mods, this.Settings.ModsToLoadEarly, this.Settings.ModsToLoadLate); mods = resolver.ProcessDependencies(mods, modDatabase).ToArray(); this.LoadMods(mods, this.Toolkit.JsonHelper, this.ContentCore, modDatabase); |