diff --git a/SmartHunter/Core/Config/ConfigContainer.cs b/SmartHunter/Core/Config/ConfigContainer.cs index c5c6462c..333a71ed 100644 --- a/SmartHunter/Core/Config/ConfigContainer.cs +++ b/SmartHunter/Core/Config/ConfigContainer.cs @@ -3,6 +3,7 @@ using System.IO; using Newtonsoft.Json; using Newtonsoft.Json.Converters; +using SmartHunter.Config; using SmartHunter.Game.Helpers; using ErrorEventArgs = Newtonsoft.Json.Serialization.ErrorEventArgs; @@ -44,8 +45,9 @@ private void Load() contents = reader.ReadToEnd(); } + var customLanguage = typeof(T).Equals(typeof(LocalizationConfig)) && !FileName.Equals("en-US.json"); var fileContentsEqualsAutoGen = contents == GetAutoGenerateedJson(); - if (!fileContentsEqualsAutoGen && FileName != "Config.json") + if (!fileContentsEqualsAutoGen && FileName != "Config.json" && !customLanguage) { Log.WriteWarning($"Warning: {FileName} differs from autogenerated version."); } @@ -65,7 +67,7 @@ private void Load() settings.Converters.Add(new StringEnumConverter()); settings.Converters.Add(new StringFloatConverter()); - if (FileName.Equals("Config.json") || fileContentsEqualsAutoGen || ConfigHelper.Main.Values.UseCustomData) + if (FileName.Equals("Config.json") || fileContentsEqualsAutoGen || ConfigHelper.Main.Values.UseCustomData || customLanguage) { JsonConvert.PopulateObject(contents, Values, settings); Log.WriteLine($"{FileName} loaded");