diff options
author | Jesse Plamondon-Willard <github@jplamondonw.com> | 2017-07-01 23:24:29 -0400 |
---|---|---|
committer | Jesse Plamondon-Willard <github@jplamondonw.com> | 2017-07-01 23:24:29 -0400 |
commit | 6da5a2d56df6a7cd1a1693f6fc3ce0288fe408a3 (patch) | |
tree | ca7de842b2f33029fb5732e608bbf57d6b07fee1 /src/StardewModdingAPI | |
parent | f95c7e8d72014f8008886031cebf7b12aeb7ed46 (diff) | |
download | SMAPI-6da5a2d56df6a7cd1a1693f6fc3ce0288fe408a3.tar.gz SMAPI-6da5a2d56df6a7cd1a1693f6fc3ce0288fe408a3.tar.bz2 SMAPI-6da5a2d56df6a7cd1a1693f6fc3ce0288fe408a3.zip |
prevent mods from using SMAPI 2.0 content interception without reflection (#255)
Diffstat (limited to 'src/StardewModdingAPI')
-rw-r--r-- | src/StardewModdingAPI/Program.cs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/StardewModdingAPI/Program.cs b/src/StardewModdingAPI/Program.cs index 483d2bc2..e7cc77ef 100644 --- a/src/StardewModdingAPI/Program.cs +++ b/src/StardewModdingAPI/Program.cs @@ -655,6 +655,14 @@ namespace StardewModdingAPI continue; } + // prevent mods from using SMAPI 2.0 content interception before release + // ReSharper disable SuspiciousTypeConversion.Global + if (mod is IAssetEditor || mod is IAssetLoader) + { + TrackSkip(metadata, $"its entry class implements {nameof(IAssetEditor)} or {nameof(IAssetLoader)}. These are part of a prototype API that isn't available for mods to use yet."); + } + // ReSharper restore SuspiciousTypeConversion.Global + // inject data mod.ModManifest = manifest; mod.Helper = new ModHelper(metadata.DisplayName, metadata.DirectoryPath, jsonHelper, this.ModRegistry, this.CommandManager, contentManager, this.Reflection); |