summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/StardewModdingAPI/Framework/SGame.cs15
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);
}