From f8866ac4a81ad02f6f06391372ad1b32e6cfdb68 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Thu, 16 Feb 2017 01:10:07 -0500 Subject: remove unneeded property for number of mods loaded --- src/StardewModdingAPI/Program.cs | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/StardewModdingAPI/Program.cs b/src/StardewModdingAPI/Program.cs index 8fd9c8e1..ecc0360e 100644 --- a/src/StardewModdingAPI/Program.cs +++ b/src/StardewModdingAPI/Program.cs @@ -63,9 +63,6 @@ namespace StardewModdingAPI /// The underlying game instance. internal SGame GameInstance; - /// The number of mods currently loaded by SMAPI. - internal int ModsLoaded; - /// Tracks the installed mods. internal readonly ModRegistry ModRegistry = new ModRegistry(); @@ -359,6 +356,7 @@ namespace StardewModdingAPI } // load mod assemblies + int modsLoaded = 0; List deprecationWarnings = new List(); // queue up deprecation warnings to show after mod list foreach (string directoryPath in Directory.GetDirectories(this.ModPath)) { @@ -529,7 +527,7 @@ namespace StardewModdingAPI // track mod this.ModRegistry.Add(mod); - this.ModsLoaded += 1; + modsLoaded += 1; this.Monitor.Log($"Loaded mod: {manifest.Name} by {manifest.Author}, v{manifest.Version} | {manifest.Description}", LogLevel.Info); } catch (Exception ex) @@ -563,8 +561,8 @@ namespace StardewModdingAPI } // print result - this.Monitor.Log($"Loaded {this.ModsLoaded} mods."); - Console.Title = $"Stardew Modding API Console - Version {Constants.ApiVersion} - Mods Loaded: {this.ModsLoaded}"; + this.Monitor.Log($"Loaded {modsLoaded} mods."); + Console.Title = $"Stardew Modding API Console - Version {Constants.ApiVersion} - Mods Loaded: {modsLoaded}"; } // ReSharper disable once FunctionNeverReturns -- cgit