diff options
author | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2018-11-07 12:17:53 -0500 |
---|---|---|
committer | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2018-11-07 12:17:53 -0500 |
commit | c0738296273304e71183ddc537aaf9ffc6d3da46 (patch) | |
tree | 1e9b51356200337757a0f459df341f6c6432dbe9 /src/SMAPI/Framework | |
parent | 0b03b4f16a446e4b139efd33f6378598ae66efee (diff) | |
download | SMAPI-c0738296273304e71183ddc537aaf9ffc6d3da46.tar.gz SMAPI-c0738296273304e71183ddc537aaf9ffc6d3da46.tar.bz2 SMAPI-c0738296273304e71183ddc537aaf9ffc6d3da46.zip |
deprecate version build field
Diffstat (limited to 'src/SMAPI/Framework')
-rw-r--r-- | src/SMAPI/Framework/SCore.cs | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/SMAPI/Framework/SCore.cs b/src/SMAPI/Framework/SCore.cs index 6cb564ce..7567c6db 100644 --- a/src/SMAPI/Framework/SCore.cs +++ b/src/SMAPI/Framework/SCore.cs @@ -77,7 +77,7 @@ namespace StardewModdingAPI.Framework /// <summary>Manages deprecation warnings.</summary> /// <remarks>This is initialised after the game starts.</remarks> - private DeprecationManager DeprecationManager; + private readonly DeprecationManager DeprecationManager; /// <summary>Manages SMAPI events for mods.</summary> private readonly EventManager EventManager; @@ -134,6 +134,10 @@ namespace StardewModdingAPI.Framework }; this.MonitorForGame = this.GetSecondaryMonitor("game"); this.EventManager = new EventManager(this.Monitor, this.ModRegistry); + this.DeprecationManager = new DeprecationManager(this.Monitor, this.ModRegistry); + + // inject deprecation managers + SemanticVersion.DeprecationManager = this.DeprecationManager; // init logging this.Monitor.Log($"SMAPI {Constants.ApiVersion} with Stardew Valley {Constants.GameVersion} on {EnvironmentUtility.GetFriendlyPlatformName(Constants.Platform)}", LogLevel.Info); @@ -340,9 +344,6 @@ namespace StardewModdingAPI.Framework /// <summary>Initialise SMAPI and mods after the game starts.</summary> private void InitialiseAfterGameStart() { - // load core components - this.DeprecationManager = new DeprecationManager(this.Monitor, this.ModRegistry); - // redirect direct console output if (this.MonitorForGame.WriteToConsole) this.ConsoleManager.OnMessageIntercepted += message => this.HandleConsoleMessage(this.MonitorForGame, message); |