summaryrefslogtreecommitdiff
path: root/StardewModdingAPI/Constants.cs
blob: f8b913f7a58d074b4fbfcfec80efb4f91d65798c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
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);
    }
}