summaryrefslogtreecommitdiff
path: root/src/SMAPI/Framework/DeprecationManager.cs
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2018-12-29 19:03:16 -0500
committerJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2018-12-29 19:03:16 -0500
commite77f17d80993d479090d1992c6a750f8041121fb (patch)
treeef79ef12546bd2b729847e16b3367ed111c762b7 /src/SMAPI/Framework/DeprecationManager.cs
parentdae12c16e5ecb88e8043272c9d8ffdc88bc351ca (diff)
downloadSMAPI-e77f17d80993d479090d1992c6a750f8041121fb.tar.gz
SMAPI-e77f17d80993d479090d1992c6a750f8041121fb.tar.bz2
SMAPI-e77f17d80993d479090d1992c6a750f8041121fb.zip
increase deprecation levels for the upcoming SMAPI 3.0
Diffstat (limited to 'src/SMAPI/Framework/DeprecationManager.cs')
-rw-r--r--src/SMAPI/Framework/DeprecationManager.cs8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/SMAPI/Framework/DeprecationManager.cs b/src/SMAPI/Framework/DeprecationManager.cs
index 70f88b5e..76c2f616 100644
--- a/src/SMAPI/Framework/DeprecationManager.cs
+++ b/src/SMAPI/Framework/DeprecationManager.cs
@@ -38,7 +38,7 @@ namespace StardewModdingAPI.Framework
/// <summary>Log a deprecation warning for the old-style events.</summary>
public void WarnForOldEvents()
{
- this.Warn("legacy events", "2.9", DeprecationLevel.Notice);
+ this.Warn("legacy events", "2.9", DeprecationLevel.Info);
}
/// <summary>Log a deprecation warning.</summary>
@@ -71,7 +71,13 @@ namespace StardewModdingAPI.Framework
foreach (DeprecationWarning warning in this.QueuedWarnings.OrderBy(p => p.ModName).ThenBy(p => p.NounPhrase))
{
// build message
+#if SMAPI_3_0_STRICT
string message = $"{warning.ModName ?? "An unknown mod"} uses deprecated code ({warning.NounPhrase} is deprecated since SMAPI {warning.Version}).";
+#else
+ string message = warning.NounPhrase == "legacy events"
+ ? $"{warning.ModName ?? "An unknown mod"} uses deprecated code (legacy events are deprecated since SMAPI {warning.Version})."
+ : $"{warning.ModName ?? "An unknown mod"} uses deprecated code ({warning.NounPhrase} is deprecated since SMAPI {warning.Version}).";
+#endif
if (warning.ModName == null)
message += $"{Environment.NewLine}{Environment.StackTrace}";