mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
Fix reload configs breaking NH translations
This commit is contained in:
parent
3f1b803b0f
commit
27386e1730
@ -121,7 +121,7 @@ namespace NewHorizons
|
||||
_wasConfigured = true;
|
||||
}
|
||||
|
||||
public static void ResetConfigs(bool resetTranslation = true)
|
||||
public void ResetConfigs(bool resetTranslation = true)
|
||||
{
|
||||
BodyDict.Clear();
|
||||
SystemDict.Clear();
|
||||
@ -160,9 +160,13 @@ namespace NewHorizons
|
||||
}
|
||||
};
|
||||
|
||||
if (!resetTranslation) return;
|
||||
TranslationHandler.ClearTables();
|
||||
TextTranslation.Get().SetLanguage(TextTranslation.Get().GetLanguage());
|
||||
if (resetTranslation)
|
||||
{
|
||||
TranslationHandler.ClearTables();
|
||||
TextTranslation.Get().SetLanguage(TextTranslation.Get().GetLanguage());
|
||||
}
|
||||
|
||||
LoadTranslations(Instance.ModHelper.Manifest.ModFolderPath + "Assets/", this);
|
||||
}
|
||||
|
||||
public void Awake()
|
||||
@ -212,7 +216,6 @@ namespace NewHorizons
|
||||
OnStarSystemLoaded.AddListener(RichPresenceHandler.OnStarSystemLoaded);
|
||||
OnChangeStarSystem.AddListener(RichPresenceHandler.OnChangeStarSystem);
|
||||
|
||||
LoadTranslations(ModHelper.Manifest.ModFolderPath + "Assets/", this);
|
||||
LoadAddonManifest("Assets/addon-manifest.json", this);
|
||||
}
|
||||
|
||||
|
||||
@ -31,7 +31,7 @@ namespace NewHorizons.Utility.DebugUtilities
|
||||
{
|
||||
Logger.Log("Begin reload of config files...");
|
||||
|
||||
Main.ResetConfigs();
|
||||
Main.Instance.ResetConfigs();
|
||||
|
||||
try
|
||||
{
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user