summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <github@jplamondonw.com>2017-05-09 22:12:02 -0400
committerJesse Plamondon-Willard <github@jplamondonw.com>2017-05-09 22:12:02 -0400
commit3fa71385e57ba45cde17bf70ad7f027a9734665f (patch)
treefe32b3e6086194b5a677fe8e1e4e7c34a081e445
parent494f9366a8e74f40e085581e8f085a03e3fc9e49 (diff)
downloadSMAPI-3fa71385e57ba45cde17bf70ad7f027a9734665f.tar.gz
SMAPI-3fa71385e57ba45cde17bf70ad7f027a9734665f.tar.bz2
SMAPI-3fa71385e57ba45cde17bf70ad7f027a9734665f.zip
add warning for mods that don't set the UniqueID manifest field
-rw-r--r--release-notes.md1
-rw-r--r--src/StardewModdingAPI/Program.cs6
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)
{