From 697155c8a239a48ecaaaca0490584b78f3e3c26e Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Mon, 3 Jul 2017 14:11:39 -0400 Subject: update deprecation warning text --- src/StardewModdingAPI/Framework/DeprecationManager.cs | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'src/StardewModdingAPI/Framework/DeprecationManager.cs') diff --git a/src/StardewModdingAPI/Framework/DeprecationManager.cs b/src/StardewModdingAPI/Framework/DeprecationManager.cs index 6b95960b..cc6754b5 100644 --- a/src/StardewModdingAPI/Framework/DeprecationManager.cs +++ b/src/StardewModdingAPI/Framework/DeprecationManager.cs @@ -52,13 +52,12 @@ namespace StardewModdingAPI.Framework if (!this.MarkWarned(source ?? "", nounPhrase, version)) return; + // show SMAPI 2.0 meta-warning + if(this.MarkWarned("SMAPI", "SMAPI 2.0 meta-warning", "2.0")) + this.Monitor.Log("Some of your mods will break in the upcoming SMAPI 2.0 release because they use obsolete APIs. Please check for a newer version of any mod showing 'may break' warnings, or let the author know about this message. For more information, see http://community.playstarbound.com/threads/135000.", 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"} may break in the upcoming SMAPI 2.0 release (detected {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: -- cgit From 3b8d1e49f025e56e0442604c2e6956d77d673b0d Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Fri, 7 Jul 2017 01:54:53 -0400 Subject: make deprecation warnings a bit less scary until we finish first-pass SMAPI 2.0 migration --- src/StardewModdingAPI/Framework/DeprecationManager.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/StardewModdingAPI/Framework/DeprecationManager.cs') diff --git a/src/StardewModdingAPI/Framework/DeprecationManager.cs b/src/StardewModdingAPI/Framework/DeprecationManager.cs index cc6754b5..8750824c 100644 --- a/src/StardewModdingAPI/Framework/DeprecationManager.cs +++ b/src/StardewModdingAPI/Framework/DeprecationManager.cs @@ -54,10 +54,10 @@ namespace StardewModdingAPI.Framework // show SMAPI 2.0 meta-warning if(this.MarkWarned("SMAPI", "SMAPI 2.0 meta-warning", "2.0")) - this.Monitor.Log("Some of your mods will break in the upcoming SMAPI 2.0 release because they use obsolete APIs. Please check for a newer version of any mod showing 'may break' warnings, or let the author know about this message. For more information, see http://community.playstarbound.com/threads/135000.", LogLevel.Warn); + this.Monitor.Log("Some of your mods use deprecated code that will stop working in a future SMAPI release. Try updating mods with 'deprecated code' warnings or let the mod authors know about this message.", LogLevel.Warn); // build message - string message = $"{source ?? "An unknown mod"} may break in the upcoming SMAPI 2.0 release (detected {nounPhrase})."; + string message = $"{source ?? "An unknown mod"} uses deprecated code ({nounPhrase})."; if (source == null) message += $"{Environment.NewLine}{Environment.StackTrace}"; -- cgit From 8743c4115aa142113d791f2d2cd9ba811dcada2c Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Sat, 8 Jul 2017 12:53:12 -0400 Subject: tweak deprecation meta-warning --- src/StardewModdingAPI/Framework/DeprecationManager.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/StardewModdingAPI/Framework/DeprecationManager.cs') diff --git a/src/StardewModdingAPI/Framework/DeprecationManager.cs b/src/StardewModdingAPI/Framework/DeprecationManager.cs index 8750824c..153d8829 100644 --- a/src/StardewModdingAPI/Framework/DeprecationManager.cs +++ b/src/StardewModdingAPI/Framework/DeprecationManager.cs @@ -54,7 +54,7 @@ namespace StardewModdingAPI.Framework // show SMAPI 2.0 meta-warning if(this.MarkWarned("SMAPI", "SMAPI 2.0 meta-warning", "2.0")) - this.Monitor.Log("Some of your mods use deprecated code that will stop working in a future SMAPI release. Try updating mods with 'deprecated code' warnings or let the mod authors know about this message.", LogLevel.Warn); + 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 ?? "An unknown mod"} uses deprecated code ({nounPhrase})."; -- cgit