Possible language fix
This commit is contained in:
parent
16f7490871
commit
241a118bec
|
@ -229,6 +229,9 @@ namespace StardewModdingAPI.Framework
|
||||||
// add more leniant assembly resolvers
|
// add more leniant assembly resolvers
|
||||||
AppDomain.CurrentDomain.AssemblyResolve += (sender, e) => AssemblyLoader.ResolveAssembly(e.Name);
|
AppDomain.CurrentDomain.AssemblyResolve += (sender, e) => AssemblyLoader.ResolveAssembly(e.Name);
|
||||||
|
|
||||||
|
// locale event
|
||||||
|
LocalizedContentManager.OnLanguageChange += locale => this.OnLocaleChanged();
|
||||||
|
|
||||||
// override game
|
// override game
|
||||||
SGame.ConstructorHack = new SGameConstructorHack(this.Monitor, this.Reflection, this.Toolkit.JsonHelper, this.InitialiseBeforeFirstAssetLoaded);
|
SGame.ConstructorHack = new SGameConstructorHack(this.Monitor, this.Reflection, this.Toolkit.JsonHelper, this.InitialiseBeforeFirstAssetLoaded);
|
||||||
this.GameInstance = new SGame(this.Monitor, this.MonitorForGame, this.Reflection, this.EventManager, this.Toolkit.JsonHelper, this.ModRegistry, SCore.DeprecationManager, this.OnLocaleChanged, this.InitialiseAfterGameStart, this.Dispose);
|
this.GameInstance = new SGame(this.Monitor, this.MonitorForGame, this.Reflection, this.EventManager, this.Toolkit.JsonHelper, this.ModRegistry, SCore.DeprecationManager, this.OnLocaleChanged, this.InitialiseAfterGameStart, this.Dispose);
|
||||||
|
|
|
@ -529,7 +529,7 @@ namespace StardewModdingAPI.Framework
|
||||||
/*********
|
/*********
|
||||||
** Locale changed events
|
** Locale changed events
|
||||||
*********/
|
*********/
|
||||||
if (this.Watchers.LocaleWatcher.IsChanged)
|
if (this.Watchers.LocaleWatcher.IsChanged || SGame.TicksElapsed == 0)
|
||||||
{
|
{
|
||||||
var was = this.Watchers.LocaleWatcher.PreviousValue;
|
var was = this.Watchers.LocaleWatcher.PreviousValue;
|
||||||
var now = this.Watchers.LocaleWatcher.CurrentValue;
|
var now = this.Watchers.LocaleWatcher.CurrentValue;
|
||||||
|
|
Loading…
Reference in New Issue