Unstable 1.2.1.0
This commit is contained in:
+5
-3
@@ -50,7 +50,8 @@ namespace Barotrauma
|
||||
if (identifier.IsEmpty)
|
||||
{
|
||||
DebugConsole.ThrowError(
|
||||
$"No identifier defined for the affliction '{elementName}' in file '{Path}'");
|
||||
$"No identifier defined for the affliction '{elementName}' in file '{Path}'",
|
||||
contentPackage: element?.ContentPackage);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -60,12 +61,13 @@ namespace Barotrauma
|
||||
{
|
||||
DebugConsole.NewMessage(
|
||||
$"Overriding an affliction or a buff with the identifier '{identifier}' using the file '{Path}'",
|
||||
Color.Yellow);
|
||||
Color.MediumPurple);
|
||||
}
|
||||
else
|
||||
{
|
||||
DebugConsole.ThrowError(
|
||||
$"Duplicate affliction: '{identifier}' defined in {elementName} of '{Path}'");
|
||||
$"Duplicate affliction: '{identifier}' defined in {elementName} of '{Path}'",
|
||||
contentPackage: element?.ContentPackage);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
+4
-3
@@ -17,12 +17,12 @@ namespace Barotrauma
|
||||
XDocument doc = XMLExtensions.TryLoadXml(Path);
|
||||
if (doc == null)
|
||||
{
|
||||
DebugConsole.ThrowError($"Loading character file failed: {Path}");
|
||||
DebugConsole.ThrowError($"Loading character file failed: {Path}", contentPackage: ContentPackage);
|
||||
return;
|
||||
}
|
||||
if (CharacterPrefab.Prefabs.AllPrefabs.Any(kvp => kvp.Value.Any(cf => cf?.ContentFile == this)))
|
||||
{
|
||||
DebugConsole.ThrowError($"Duplicate path: {Path}");
|
||||
DebugConsole.ThrowError($"Duplicate path: {Path}", contentPackage: ContentPackage);
|
||||
return;
|
||||
}
|
||||
var mainElement = doc.Root.FromPackage(ContentPackage);
|
||||
@@ -69,7 +69,8 @@ namespace Barotrauma
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
DebugConsole.ThrowError($"Failed to preload a ragdoll file for the character \"{characterPrefab.Name}\"", e);
|
||||
DebugConsole.ThrowError($"Failed to preload a ragdoll file for the character \"{characterPrefab.Name}\"", e,
|
||||
contentPackage: characterPrefab.ContentPackage);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
+2
-1
@@ -76,7 +76,8 @@ namespace Barotrauma
|
||||
{
|
||||
DebugConsole.AddWarning(
|
||||
$"The content type \"TraitorMission\" in content package \"{package.Name}\" is no longer supported." +
|
||||
$" Traitor missions should be implemented using the scripted event system and the content type TraitorEvents.");
|
||||
$" Traitor missions should be implemented using the scripted event system and the content type TraitorEvents.",
|
||||
package);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
+1
-1
@@ -55,7 +55,7 @@ namespace Barotrauma
|
||||
}
|
||||
else
|
||||
{
|
||||
DebugConsole.ThrowError($"GenericPrefabFile: Invalid {GetType().Name} element: {parentElement.Name} in {Path}");
|
||||
DebugConsole.ThrowError($"GenericPrefabFile: Invalid {GetType().Name} element: {parentElement.Name} in {Path}", contentPackage: ContentPackage);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+1
@@ -2,6 +2,7 @@ using System.Xml.Linq;
|
||||
|
||||
namespace Barotrauma
|
||||
{
|
||||
[NotSyncedInMultiplayer]
|
||||
sealed class NPCConversationsFile : ContentFile
|
||||
{
|
||||
public NPCConversationsFile(ContentPackage contentPackage, ContentPath path) : base(contentPackage, path) { }
|
||||
|
||||
+2
-1
@@ -42,7 +42,8 @@ namespace Barotrauma
|
||||
}
|
||||
else
|
||||
{
|
||||
DebugConsole.ThrowError($"OrdersFile: Invalid {GetType().Name} element: {parentElement.Name} in {Path}");
|
||||
DebugConsole.ThrowError($"OrdersFile: Invalid {GetType().Name} element: {parentElement.Name} in {Path}",
|
||||
contentPackage: parentElement?.ContentPackage);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+2
-1
@@ -65,7 +65,8 @@ namespace Barotrauma
|
||||
}
|
||||
else
|
||||
{
|
||||
DebugConsole.ThrowError($"RandomEventsFile: Invalid {GetType().Name} element: {parentElement.Name} in {Path}");
|
||||
DebugConsole.ThrowError($"RandomEventsFile: Invalid {GetType().Name} element: {parentElement.Name} in {Path}",
|
||||
contentPackage: parentElement.ContentPackage);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user