summaryrefslogtreecommitdiff
path: root/src/StardewModdingAPI/Constants.cs
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <github@jplamondonw.com>2016-12-18 15:37:23 -0500
committerJesse Plamondon-Willard <github@jplamondonw.com>2016-12-18 15:37:23 -0500
commit23988a3c33a7a1616c2d36a2c4b7e3a2d06f4216 (patch)
tree42b66e7aaac4cdb5fcb1723c2b21d2f2a92eb4cd /src/StardewModdingAPI/Constants.cs
parent487ae1dce92a410984a7c13bf0f30bdd0d878aea (diff)
downloadSMAPI-23988a3c33a7a1616c2d36a2c4b7e3a2d06f4216.tar.gz
SMAPI-23988a3c33a7a1616c2d36a2c4b7e3a2d06f4216.tar.bz2
SMAPI-23988a3c33a7a1616c2d36a2c4b7e3a2d06f4216.zip
migrate manifest & version to interfaces with backwards compatibility (#197)
Diffstat (limited to 'src/StardewModdingAPI/Constants.cs')
-rw-r--r--src/StardewModdingAPI/Constants.cs8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/StardewModdingAPI/Constants.cs b/src/StardewModdingAPI/Constants.cs
index f5b9e70a..57a89e76 100644
--- a/src/StardewModdingAPI/Constants.cs
+++ b/src/StardewModdingAPI/Constants.cs
@@ -26,7 +26,11 @@ namespace StardewModdingAPI
** Accessors
*********/
/// <summary>SMAPI's current semantic version.</summary>
- public static readonly Version Version = new Version(1, 4, 0, null);
+ [Obsolete("Use " + nameof(Constants) + "." + nameof(ApiVersion))]
+ public static readonly Version Version = (Version)Constants.ApiVersion;
+
+ /// <summary>SMAPI's current semantic version.</summary>
+ public static ISemanticVersion ApiVersion => new Version(1, 4, 0, null, suppressDeprecationWarning: true);
/// <summary>The minimum supported version of Stardew Valley.</summary>
public const string MinimumGameVersion = "1.1";
@@ -56,7 +60,7 @@ namespace StardewModdingAPI
public static string ExecutionPath => Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
/// <summary>The title of the SMAPI console window.</summary>
- public static string ConsoleTitle => $"Stardew Modding API Console - Version {Constants.Version} - Mods Loaded: {Program.ModsLoaded}";
+ public static string ConsoleTitle => $"Stardew Modding API Console - Version {Constants.ApiVersion} - Mods Loaded: {Program.ModsLoaded}";
/// <summary>The directory path in which error logs should be stored.</summary>
public static string LogDir => Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "StardewValley", "ErrorLogs");