From 56d28ef0d4072d6b3b3dce0b2c1f6cb24408bf95 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Thu, 9 Feb 2017 23:27:08 -0500 Subject: make some constants internal (#231) --- src/StardewModdingAPI/Constants.cs | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-) (limited to 'src') diff --git a/src/StardewModdingAPI/Constants.cs b/src/StardewModdingAPI/Constants.cs index c71401b1..438c869c 100644 --- a/src/StardewModdingAPI/Constants.cs +++ b/src/StardewModdingAPI/Constants.cs @@ -26,24 +26,21 @@ namespace StardewModdingAPI /********* ** Accessors *********/ + /**** + ** Public + ****/ /// SMAPI's current semantic version. public static ISemanticVersion ApiVersion => new SemanticVersion(1, 8, 0, null); /// The minimum supported version of Stardew Valley. public const string MinimumGameVersion = "1.2"; - /// The GitHub repository to check for updates. - public const string GitHubRepository = "Pathoschild/SMAPI"; - /// The directory path containing Stardew Valley's app data. public static string DataPath => Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "StardewValley"); /// The directory path where all saves are stored. public static string SavesPath => Path.Combine(Constants.DataPath, "Saves"); - /// Whether the directory containing the current save's data exists on disk. - public static bool CurrentSavePathExists => Directory.Exists(Constants.RawSavePath); - /// The directory name containing the current save's data (if a save is loaded and the directory exists). public static string SaveFolderName => Constants.CurrentSavePathExists ? Constants.RawSaveFolderName : ""; @@ -56,14 +53,17 @@ namespace StardewModdingAPI /// The path to the current assembly being executing. public static string ExecutionPath => Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); - /// The title of the SMAPI console window. - public static string ConsoleTitle => $"Stardew Modding API Console - Version {Constants.ApiVersion} - Mods Loaded: {Program.ModsLoaded}"; - /// The directory path in which error logs should be stored. public static string LogDir => Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "StardewValley", "ErrorLogs"); - /// The file path to the log where the latest output should be saved. - public static string LogPath => Path.Combine(Constants.LogDir, "SMAPI-latest.txt"); + /**** + ** Internal + ****/ + /// The GitHub repository to check for updates. + internal const string GitHubRepository = "Pathoschild/SMAPI"; + + /// The title of the SMAPI console window. + internal static string ConsoleTitle => $"Stardew Modding API Console - Version {Constants.ApiVersion} - Mods Loaded: {Program.ModsLoaded}"; /// The file path for the SMAPI configuration file. internal static string ApiConfigPath => Path.Combine(Constants.ExecutionPath, $"{typeof(Program).Assembly.GetName().Name}.config.json"); @@ -71,6 +71,12 @@ namespace StardewModdingAPI /// The file path for the SMAPI data file containing metadata about known mods. internal static string ApiModMetadataPath => Path.Combine(Constants.ExecutionPath, $"{typeof(Program).Assembly.GetName().Name}.data.json"); + /// The file path to the log where the latest output should be saved. + internal static string LogPath => Path.Combine(Constants.LogDir, "SMAPI-latest.txt"); + + /// Whether the directory containing the current save's data exists on disk. + internal static bool CurrentSavePathExists => Directory.Exists(Constants.RawSavePath); + /********* ** Protected methods -- cgit