diff options
-rw-r--r-- | release-notes.md | 1 | ||||
-rw-r--r-- | src/StardewModdingAPI/Program.cs | 6 |
2 files changed, 6 insertions, 1 deletions
diff --git a/release-notes.md b/release-notes.md index ebd5f981..02a6da4c 100644 --- a/release-notes.md +++ b/release-notes.md @@ -20,6 +20,7 @@ For players: For mod developers: * Added log entries for basic context changes (e.g. loaded save) to simplify troubleshooting. More detailed logging can be enabled by setting `VerboseLogging: true` in `StardewModdingAPI.config.json`. * Added `debug` console command to TrainerMod which lets you pass debug commands to the game (e.g. `debug warp FarmHouse 1 1` warps the player to the farmhouse). +* Added a warning for mods that don't set the `UniqueID` manifest field, which will be required in SMAPI 2.0. * Mods now implement `IDisposable` to let them release any unmanaged resources. ## 1.12 diff --git a/src/StardewModdingAPI/Program.cs b/src/StardewModdingAPI/Program.cs index a5905805..70b2fbc1 100644 --- a/src/StardewModdingAPI/Program.cs +++ b/src/StardewModdingAPI/Program.cs @@ -501,11 +501,15 @@ namespace StardewModdingAPI this.Monitor.Log($"{skippedPrefix} because its manifest is invalid.", LogLevel.Error); continue; } - if (string.IsNullOrEmpty(manifest.EntryDll)) + + // validate manifest + if (string.IsNullOrWhiteSpace(manifest.EntryDll)) { this.Monitor.Log($"{skippedPrefix} because its manifest doesn't specify an entry DLL.", LogLevel.Error); continue; } + if (string.IsNullOrWhiteSpace(manifest.UniqueID)) + deprecationWarnings.Add(() => this.Monitor.Log($"{manifest.Name} doesn't have a {nameof(IManifest.UniqueID)} in its manifest. This will be required in an upcoming SMAPI release.", LogLevel.Warn)); } catch (Exception ex) { |