From f6f52b653e59778f9e0b2684faa1ad554acce02f Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Thu, 22 Dec 2016 13:08:45 -0500 Subject: add known incompatible mods, update release notes (#192) --- release-notes.md | 1 + src/StardewModdingAPI/Program.cs | 6 ++++-- src/StardewModdingAPI/StardewModdingAPI.data.json | 21 +++++++++++++++++++++ 3 files changed, 26 insertions(+), 2 deletions(-) diff --git a/release-notes.md b/release-notes.md index 804d78ba..11f393bd 100644 --- a/release-notes.md +++ b/release-notes.md @@ -5,6 +5,7 @@ See [log](https://github.com/Pathoschild/SMAPI/compare/stable...develop). For players: * Added option to disable update checks. + * SMAPI will now show a friendly error with update links when you try to use a known incompatible mod version. * Fixed error when a mod uses the new reflection API on a missing field or method. For developers: diff --git a/src/StardewModdingAPI/Program.cs b/src/StardewModdingAPI/Program.cs index 7de22ee9..c3bd1646 100644 --- a/src/StardewModdingAPI/Program.cs +++ b/src/StardewModdingAPI/Program.cs @@ -323,8 +323,10 @@ namespace StardewModdingAPI // load mods foreach (string directory in Directory.GetDirectories(Program.ModPath)) { + string directoryName = new DirectoryInfo(directory).Name; + // ignore internal directory - if (new DirectoryInfo(directory).Name == ".cache") + if (directoryName == ".cache") continue; // check for cancellation @@ -341,7 +343,7 @@ namespace StardewModdingAPI string manifestPath = Path.Combine(directory, "manifest.json"); if (!File.Exists(manifestPath)) { - Program.Monitor.Log($"Ignored folder \"{new DirectoryInfo(directory).Name}\" which doesn't have a manifest.json.", LogLevel.Warn); + Program.Monitor.Log($"Ignored folder \"{directoryName}\" which doesn't have a manifest.json.", LogLevel.Warn); continue; } string errorPrefix = $"Couldn't load mod for manifest '{manifestPath}'"; diff --git a/src/StardewModdingAPI/StardewModdingAPI.data.json b/src/StardewModdingAPI/StardewModdingAPI.data.json index 91321c69..2f1d67e8 100644 --- a/src/StardewModdingAPI/StardewModdingAPI.data.json +++ b/src/StardewModdingAPI/StardewModdingAPI.data.json @@ -6,11 +6,32 @@ This file contains advanced metadata for SMAPI. You shouldn't change this file. */ [ + { + "ID": "SPDSprinklersMod", + "Name": "Better Sprinklers", + "Version": "2.1", + "UpdateUrl": "http://www.nexusmods.com/stardewvalley/mods/41", + "UnofficialUpdateUrl": "http://community.playstarbound.com/threads/125031" + }, + { + "ID": "SPDChestLabel", + "Name": "Chest Label System", + "Version": "1.5", + "UpdateUrl": "http://www.nexusmods.com/stardewvalley/mods/242", + "UnofficialUpdateUrl": "http://community.playstarbound.com/threads/125031" + }, { "ID": "CJBCheatsMenu", "Name": "CJB Cheats Menu", "Version": "1.12", "UpdateUrl": "http://www.nexusmods.com/stardewvalley/mods/4", "UnofficialUpdateUrl": "http://community.playstarbound.com/threads/125031" + }, + { + "ID": "CJBItemSpawner", + "Name": "CJB Item Spawner", + "Version": "1.5", + "UpdateUrl": "http://www.nexusmods.com/stardewvalley/mods/93", + "UnofficialUpdateUrl": "http://community.playstarbound.com/threads/125031" } ] -- cgit