summaryrefslogtreecommitdiff
path: root/src/StardewModdingAPI/Framework/DeprecationManager.cs
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <github@jplamondonw.com>2017-07-08 12:54:06 -0400
committerJesse Plamondon-Willard <github@jplamondonw.com>2017-07-08 12:54:06 -0400
commit1edd98aef027faa768f56cf0b3591e64e20ba096 (patch)
treeaec210e2b44c9654f29572dd084206a4598896e1 /src/StardewModdingAPI/Framework/DeprecationManager.cs
parent36930ffd7d363d6afd7f8cac4918c7d1c1c3e339 (diff)
parent8743c4115aa142113d791f2d2cd9ba811dcada2c (diff)
downloadSMAPI-1edd98aef027faa768f56cf0b3591e64e20ba096.tar.gz
SMAPI-1edd98aef027faa768f56cf0b3591e64e20ba096.tar.bz2
SMAPI-1edd98aef027faa768f56cf0b3591e64e20ba096.zip
Merge branch 'develop' into stable
Diffstat (limited to 'src/StardewModdingAPI/Framework/DeprecationManager.cs')
-rw-r--r--src/StardewModdingAPI/Framework/DeprecationManager.cs13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/StardewModdingAPI/Framework/DeprecationManager.cs b/src/StardewModdingAPI/Framework/DeprecationManager.cs
index 6b95960b..153d8829 100644
--- a/src/StardewModdingAPI/Framework/DeprecationManager.cs
+++ b/src/StardewModdingAPI/Framework/DeprecationManager.cs
@@ -52,13 +52,12 @@ namespace StardewModdingAPI.Framework
if (!this.MarkWarned(source ?? "<unknown>", nounPhrase, version))
return;
+ // show SMAPI 2.0 meta-warning
+ if(this.MarkWarned("SMAPI", "SMAPI 2.0 meta-warning", "2.0"))
+ this.Monitor.Log("Some mods may stop working in SMAPI 2.0 (but they'll work fine for now). Try updating mods with 'deprecated code' warnings; if that doesn't remove the warnings, let the mod authors know about this message or see http://community.playstarbound.com/threads/135000 for details.", LogLevel.Warn);
+
// build message
- string message = source != null
- ? $"{source} used {nounPhrase}, which is deprecated since SMAPI {version}."
- : $"An unknown mod used {nounPhrase}, which is deprecated since SMAPI {version}.";
- message += severity != DeprecationLevel.PendingRemoval
- ? " This will break in a future version of SMAPI."
- : " It will be removed soon, so the mod will break if it's not updated.";
+ string message = $"{source ?? "An unknown mod"} uses deprecated code ({nounPhrase}).";
if (source == null)
message += $"{Environment.NewLine}{Environment.StackTrace}";
@@ -70,7 +69,7 @@ namespace StardewModdingAPI.Framework
break;
case DeprecationLevel.Info:
- this.Monitor.Log(message, LogLevel.Warn);
+ this.Monitor.Log(message, LogLevel.Debug);
break;
case DeprecationLevel.PendingRemoval: