diff options
author | Jesse Plamondon-Willard <github@jplamondonw.com> | 2018-03-03 17:54:17 -0500 |
---|---|---|
committer | Jesse Plamondon-Willard <github@jplamondonw.com> | 2018-03-03 17:54:17 -0500 |
commit | 36a527956c5410fe5992bfc42fdc11adff9cd9db (patch) | |
tree | ca7a4c98fbb24d0f57de9753779e7cd3bf45a971 /src | |
parent | adebec4dd4d3bf4b45f23377a6ab1525fa2d78ef (diff) | |
download | SMAPI-36a527956c5410fe5992bfc42fdc11adff9cd9db.tar.gz SMAPI-36a527956c5410fe5992bfc42fdc11adff9cd9db.tar.bz2 SMAPI-36a527956c5410fe5992bfc42fdc11adff9cd9db.zip |
fix detected incompatibility errors not showing mod's update URL (#453)
Diffstat (limited to 'src')
-rw-r--r-- | src/SMAPI/Program.cs | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/SMAPI/Program.cs b/src/SMAPI/Program.cs index acab8c70..fec03d6f 100644 --- a/src/SMAPI/Program.cs +++ b/src/SMAPI/Program.cs @@ -388,7 +388,7 @@ namespace StardewModdingAPI mods = resolver.ProcessDependencies(mods, modDatabase).ToArray(); // load mods - this.LoadMods(mods, this.JsonHelper, this.ContentManager); + this.LoadMods(mods, this.JsonHelper, this.ContentManager, modDatabase); // check for updates this.CheckForUpdatesAsync(mods); @@ -670,7 +670,8 @@ namespace StardewModdingAPI /// <param name="mods">The mods to load.</param> /// <param name="jsonHelper">The JSON helper with which to read mods' JSON files.</param> /// <param name="contentManager">The content manager to use for mod content.</param> - private void LoadMods(IModMetadata[] mods, JsonHelper jsonHelper, SContentManager contentManager) + /// <param name="modDatabase">Handles access to SMAPI's internal mod metadata list.</param> + private void LoadMods(IModMetadata[] mods, JsonHelper jsonHelper, SContentManager contentManager, ModDatabase modDatabase) { this.Monitor.Log("Loading mods...", LogLevel.Trace); @@ -744,9 +745,10 @@ namespace StardewModdingAPI { modAssembly = modAssemblyLoader.Load(metadata, assemblyPath, assumeCompatible: metadata.DataRecord?.Status == ModStatus.AssumeCompatible); } - catch (IncompatibleInstructionException ex) + catch (IncompatibleInstructionException) // details already in trace logs { - TrackSkip(metadata, "it's no longer compatible. Please check for a newer version of the mod."); + string url = modDatabase.GetModPageUrlFor(metadata.Manifest.UniqueID); + TrackSkip(metadata, $"it's no longer compatible. Please check for a newer version of the mod{(url != null ? $" at {url}" : "")}."); continue; } catch (SAssemblyLoadFailedException ex) |