From 27dece2cf445147c5e2848f9ec26f38a101f50fc Mon Sep 17 00:00:00 2001 From: Gormogon Date: Sun, 29 May 2016 18:23:01 -0400 Subject: Attempt to migrate to new directory structure. --- StardewModdingAPI/Constants.cs | 67 ------------------------------------------ 1 file changed, 67 deletions(-) delete mode 100644 StardewModdingAPI/Constants.cs (limited to 'StardewModdingAPI/Constants.cs') diff --git a/StardewModdingAPI/Constants.cs b/StardewModdingAPI/Constants.cs deleted file mode 100644 index 0dd387b3..00000000 --- a/StardewModdingAPI/Constants.cs +++ /dev/null @@ -1,67 +0,0 @@ -using System; -using System.IO; -using System.Reflection; -using StardewValley; - -namespace StardewModdingAPI -{ - /// - /// Static class containing readonly values. - /// - public static class Constants - { - public static readonly Version Version = new Version(0, 40, 0, "Alpha"); - - /// - /// Not quite "constant", but it makes more sense for it to be here, at least for now - /// - public static int ModsLoaded = 0; - - /// - /// Stardew Valley's roaming app data location. - /// %AppData%//StardewValley - /// - public static string DataPath => Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "StardewValley"); - - public static string SavesPath => Path.Combine(DataPath, "Saves"); - - private static string saveFolderName => PlayerNull ? string.Empty : Game1.player.name.RemoveNumerics() + "_" + Game1.uniqueIDForThisGame; - public static string SaveFolderName => CurrentSavePathExists ? saveFolderName : ""; - - private static string currentSavePath => PlayerNull ? string.Empty : Path.Combine(SavesPath, saveFolderName); - public static string CurrentSavePath => CurrentSavePathExists ? currentSavePath : ""; - - public static bool CurrentSavePathExists => Directory.Exists(currentSavePath); - - public static bool PlayerNull => !Game1.hasLoadedGame || Game1.player == null || string.IsNullOrEmpty(Game1.player.name); - - /// - /// Execution path to execute the code. - /// - public static string ExecutionPath => Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); - - /// - /// Title for the API console - /// - public static string ConsoleTitle => $"Stardew Modding API Console - Version {Version.VersionString} - Mods Loaded: {ModsLoaded}"; - - /// - /// Path for log files to be output to. - /// %LocalAppData%//StardewValley//ErrorLogs - /// - public static string LogDir => Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "StardewValley", "ErrorLogs"); - - public static string LogPath => Path.Combine(LogDir, "MODDED_ProgramLog.Log_LATEST.txt"); - - /// - /// Whether or not to enable the Render Target drawing code offered by ClxS - /// Do not mark as 'const' or else 'if' checks will complain that the expression is always true in ReSharper - /// - public static bool EnableDrawingIntoRenderTarget => true; - - /// - /// Completely overrides the base game's draw call to the one is SGame - /// - public static bool EnableCompletelyOverridingBaseCalls => true; - } -} \ No newline at end of file -- cgit