From 7fe6dafbaa0b01bf18b4973e2f537cbe1b002c1e Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Fri, 4 Nov 2016 16:14:14 -0400 Subject: move 'mods loaded' out of constants --- src/StardewModdingAPI/Constants.cs | 5 +---- src/StardewModdingAPI/Program.cs | 7 +++++-- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/StardewModdingAPI/Constants.cs b/src/StardewModdingAPI/Constants.cs index b9501ad8..d023be3c 100644 --- a/src/StardewModdingAPI/Constants.cs +++ b/src/StardewModdingAPI/Constants.cs @@ -27,9 +27,6 @@ namespace StardewModdingAPI /// The GitHub repository to check for updates. public const string GitHubRepository = "cjsu/SMAPI"; - /// The number of mods currently loaded by SMAPI. - public static int ModsLoaded = 0; - /// The directory path containing Stardew Valley's app data. public static string DataPath => Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "StardewValley"); @@ -52,7 +49,7 @@ namespace StardewModdingAPI 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.Version} - Mods Loaded: {Constants.ModsLoaded}"; + public static string ConsoleTitle => $"Stardew Modding API Console - Version {Constants.Version} - 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"); diff --git a/src/StardewModdingAPI/Program.cs b/src/StardewModdingAPI/Program.cs index 2908de8f..3bfaee0d 100644 --- a/src/StardewModdingAPI/Program.cs +++ b/src/StardewModdingAPI/Program.cs @@ -18,6 +18,9 @@ namespace StardewModdingAPI { public class Program { + /// The number of mods currently loaded by SMAPI. + public static int ModsLoaded = 0; + /// The full path to the Stardew Valley executable. private static readonly string GameExecutablePath = File.Exists(Path.Combine(Constants.ExecutionPath, "StardewValley.exe")) ? Path.Combine(Constants.ExecutionPath, "StardewValley.exe") // Linux or Mac @@ -314,7 +317,7 @@ namespace StardewModdingAPI modEntry.PathOnDisk = targDir; modEntry.Manifest = manifest; Log.AsyncG($"LOADED MOD: {modEntry.Manifest.Name} by {modEntry.Manifest.Author} - Version {modEntry.Manifest.Version} | Description: {modEntry.Manifest.Description} (@ {targDll})"); - Constants.ModsLoaded += 1; + Program.ModsLoaded += 1; modEntry.Entry(); } } @@ -328,7 +331,7 @@ namespace StardewModdingAPI } } - Log.AsyncG($"LOADED {Constants.ModsLoaded} MODS"); + Log.AsyncG($"LOADED {Program.ModsLoaded} MODS"); Console.Title = Constants.ConsoleTitle; } -- cgit