diff options
author | Jesse Plamondon-Willard <github@jplamondonw.com> | 2017-03-01 20:09:51 -0500 |
---|---|---|
committer | Jesse Plamondon-Willard <github@jplamondonw.com> | 2017-03-01 20:09:51 -0500 |
commit | c23f70d602eacbed405a39797e40ee9e89537cf4 (patch) | |
tree | 0853767ef7c566bf3f1d0f3b09abc5287d785b3e | |
parent | 5ed6eb09860050f1a669539a75df21200d59f554 (diff) | |
download | SMAPI-c23f70d602eacbed405a39797e40ee9e89537cf4.tar.gz SMAPI-c23f70d602eacbed405a39797e40ee9e89537cf4.tar.bz2 SMAPI-c23f70d602eacbed405a39797e40ee9e89537cf4.zip |
update content manager code for SDV 1.2.11 (#173)
-rw-r--r-- | src/StardewModdingAPI/Framework/SGame.cs | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/StardewModdingAPI/Framework/SGame.cs b/src/StardewModdingAPI/Framework/SGame.cs index aab44b59..675dc0c2 100644 --- a/src/StardewModdingAPI/Framework/SGame.cs +++ b/src/StardewModdingAPI/Framework/SGame.cs @@ -285,17 +285,18 @@ namespace StardewModdingAPI.Framework GameEvents.InvokeInitialize(this.Monitor); } + /// <summary>Constructor a content manager to read XNB files.</summary> + /// <param name="serviceProvider">The service provider to use to locate services.</param> + /// <param name="rootDirectory">The root directory to search for content.</param> + protected override LocalizedContentManager CreateContentManager(IServiceProvider serviceProvider, string rootDirectory) + { + return new SContentManager(this.Content.ServiceProvider, this.Content.RootDirectory, this.Monitor); + } + /// <summary>The method called before XNA or MonoGame loads or reloads graphics resources.</summary> protected override void LoadContent() { - // override content manager - LocalizedContentManager contentManager = Game1.content; - Game1.content = new SContentManager(this.Content.ServiceProvider, this.Content.RootDirectory, this.Monitor); - - // defer to game logic base.LoadContent(); - - // raise load content event GameEvents.InvokeLoadContent(this.Monitor); } |