summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2020-08-25 23:13:55 -0400
committerJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2020-08-25 23:13:55 -0400
commita4938fc4653ad386e9ac88c2e6a0d95347b3f6f7 (patch)
treecf5b98546b840d298bf9797dc91c713fa7712437
parentec4b81819aeaaeba5f5f3edf28e72b0e6f0430c4 (diff)
downloadSMAPI-a4938fc4653ad386e9ac88c2e6a0d95347b3f6f7.tar.gz
SMAPI-a4938fc4653ad386e9ac88c2e6a0d95347b3f6f7.tar.bz2
SMAPI-a4938fc4653ad386e9ac88c2e6a0d95347b3f6f7.zip
tweak locale init so it doesn't depend on the game's internal load order
-rw-r--r--src/SMAPI/Framework/SCore.cs7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/SMAPI/Framework/SCore.cs b/src/SMAPI/Framework/SCore.cs
index a6067867..99a809ad 100644
--- a/src/SMAPI/Framework/SCore.cs
+++ b/src/SMAPI/Framework/SCore.cs
@@ -257,15 +257,13 @@ namespace StardewModdingAPI.Framework
multiplayer: multiplayer,
exitGameImmediately: this.ExitGameImmediately
);
+ StardewValley.Program.gamePtr = this.Game;
// hook game events
this.Game.OnGameContentLoaded += this.OnLoadContent;
this.Game.OnGameUpdating += this.OnGameUpdating;
this.Game.OnGameExiting += this.OnGameExiting;
- this.Translator.SetLocale(this.ContentCore.GetLocale(), this.ContentCore.Language);
- StardewValley.Program.gamePtr = this.Game;
-
// apply game patches
new GamePatcher(this.Monitor).Apply(
new EventErrorPatch(this.LogManager.MonitorForGame),
@@ -1074,6 +1072,9 @@ namespace StardewModdingAPI.Framework
if (this.ContentCore == null)
{
this.ContentCore = new ContentCoordinator(serviceProvider, rootDirectory, Thread.CurrentThread.CurrentUICulture, this.Monitor, this.Reflection, this.Toolkit.JsonHelper, this.InitializeBeforeFirstAssetLoaded);
+ if (this.ContentCore.Language != this.Translator.LocaleEnum)
+ this.Translator.SetLocale(this.ContentCore.GetLocale(), this.ContentCore.Language);
+
this.NextContentManagerIsMain = true;
return this.ContentCore.CreateGameContentManager("Game1._temporaryContent");
}