From 8d704153762fa73416a3ccb44ee71032952802eb Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Sat, 26 Mar 2022 15:02:11 -0400 Subject: add deprecation notices for SMAPI 4.0.0 (#766) --- src/SMAPI/Constants.cs | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'src/SMAPI/Constants.cs') diff --git a/src/SMAPI/Constants.cs b/src/SMAPI/Constants.cs index b736ca59..3351e5c4 100644 --- a/src/SMAPI/Constants.cs +++ b/src/SMAPI/Constants.cs @@ -77,8 +77,21 @@ namespace StardewModdingAPI public static GameFramework GameFramework { get; } = EarlyConstants.GameFramework; /// The path to the game folder. - [Obsolete($"Use {nameof(GamePath)} instead.")] - public static string ExecutionPath => Constants.GamePath; + [Obsolete($"Use {nameof(Constants)}.{nameof(GamePath)} instead.")] + public static string ExecutionPath + { + get + { + SCore.DeprecationManager.Warn( + source: SCore.DeprecationManager.GetSourceNameFromStack(), + nounPhrase: $"{nameof(Constants)}.{nameof(Constants.ExecutionPath)}", + version: "3.14.0", + severity: DeprecationLevel.Notice + ); + + return Constants.GamePath; + } + } /// The path to the game folder. public static string GamePath { get; } = EarlyConstants.GamePath; -- cgit