Unstable 1.2.1.0

This commit is contained in:
Markus Isberg
2023-11-10 17:45:19 +02:00
parent 2ea58c58a7
commit 8a2e2ea0ae
268 changed files with 4076 additions and 1843 deletions
@@ -4,6 +4,7 @@ using System.Xml.Linq;
namespace Barotrauma
{
[NotSyncedInMultiplayer]
public sealed class TextFile : ContentFile
{
public TextFile(ContentPackage contentPackage, ContentPath path) : base(contentPackage, path) { }
@@ -37,6 +38,13 @@ namespace Barotrauma
if (newHashSet.Count != 0) { TextManager.TextPacks.TryAdd(kvp.Key, newHashSet); }
}
TextManager.IncrementLanguageVersion();
if (!TextManager.TextPacks.ContainsKey(GameSettings.CurrentConfig.Language))
{
DebugConsole.AddWarning($"The language {GameSettings.CurrentConfig.Language} is no longer available. Switching to {TextManager.DefaultLanguage}...");
var config = GameSettings.CurrentConfig;
config.Language = TextManager.DefaultLanguage;
GameSettings.SetCurrentConfig(config);
}
}
public override void Sort()