summaryrefslogtreecommitdiff
path: root/StardewModdingAPI/Constants.cs
diff options
context:
space:
mode:
authorCarl <slxxls92@gmail.com>2016-03-06 22:32:55 +0000
committerCarl <slxxls92@gmail.com>2016-03-06 22:32:55 +0000
commit8bf9e7409692a59c880158cf851f55da35f3022e (patch)
tree155541bd3e82c993cba4aad0d67568e751855f4b /StardewModdingAPI/Constants.cs
parentbfe6537f84fe780197c4554f360f19c3f9f12371 (diff)
parentbfd8d047666737443c8cf99bd4764d7bf03ee91b (diff)
downloadSMAPI-8bf9e7409692a59c880158cf851f55da35f3022e.tar.gz
SMAPI-8bf9e7409692a59c880158cf851f55da35f3022e.tar.bz2
SMAPI-8bf9e7409692a59c880158cf851f55da35f3022e.zip
Merge pull request #9 from Jtfinlay/dev
Main refactor
Diffstat (limited to 'StardewModdingAPI/Constants.cs')
-rw-r--r--StardewModdingAPI/Constants.cs44
1 files changed, 44 insertions, 0 deletions
diff --git a/StardewModdingAPI/Constants.cs b/StardewModdingAPI/Constants.cs
new file mode 100644
index 00000000..f8b913f7
--- /dev/null
+++ b/StardewModdingAPI/Constants.cs
@@ -0,0 +1,44 @@
+using System;
+using System.IO;
+using System.Reflection;
+
+namespace StardewModdingAPI
+{
+ /// <summary>
+ /// Static class containing readonly values.
+ /// </summary>
+ public static class Constants
+ {
+ /// <summary>
+ /// Stardew Valley's local app data location.
+ /// %LocalAppData%//StardewValley
+ /// </summary>
+ public static string DataPath => Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "StardewValley");
+
+ /// <summary>
+ /// Execution path to execute the code.
+ /// </summary>
+ public static string ExecutionPath => Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
+
+ /// <summary>
+ /// Title for the API console
+ /// </summary>
+ public static string ConsoleTitle => string.Format("Stardew Modding API Console - Version {0}", VersionString);
+
+ /// <summary>
+ /// Path for log files to be output to.
+ /// %LocalAppData%//StardewValley//ErrorLogs
+ /// </summary>
+ public static string LogPath => Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "StardewValley", "ErrorLogs");
+
+ public const int MajorVersion = 0;
+
+ public const int MinorVersion = 37;
+
+ public const int PatchVersion = 1;
+
+ public const string Build = "Alpha";
+
+ public static string VersionString => string.Format("{0}.{1}.{2} {3}", MajorVersion, MinorVersion, PatchVersion, Build);
+ }
+}