Merge branch 'master' of https://github.com/Regalis11/Barotrauma into develop

This commit is contained in:
EvilFactory
2023-12-20 11:34:03 -03:00
36 changed files with 182 additions and 81 deletions
@@ -176,7 +176,7 @@ namespace Barotrauma
}
catch (Exception e)
{
DebugConsole.ThrowError("Deleting item assembly \"" + Name + "\" failed.", e);
DebugConsole.ThrowErrorLocalized("Deleting item assembly \"" + Name + "\" failed.", e);
}
}
@@ -570,9 +570,9 @@ namespace Barotrauma
if (nameIdentifier.IsEmpty)
{
//backwards compatibility
rawName = element.GetAttributeString("basename", "");
nameIdentifier = rawName.ToIdentifier();
DisplayName = element.GetAttributeString("name", "");
rawName = element.GetAttributeString("rawname", element.GetAttributeString("basename", DisplayName.Value));
nameIdentifier = rawName.ToIdentifier();
}
else
{
@@ -1088,12 +1088,12 @@ namespace Barotrauma
{
if (!Type.HasHireableCharacters)
{
DebugConsole.ThrowError("Cannot hire a character from location \"" + DisplayName + "\" - the location has no hireable characters.\n" + Environment.StackTrace.CleanupStackTrace());
DebugConsole.ThrowErrorLocalized("Cannot hire a character from location \"" + DisplayName + "\" - the location has no hireable characters.\n" + Environment.StackTrace.CleanupStackTrace());
return;
}
if (HireManager == null)
{
DebugConsole.ThrowError("Cannot hire a character from location \"" + DisplayName + "\" - hire manager has not been instantiated.\n" + Environment.StackTrace.CleanupStackTrace());
DebugConsole.ThrowErrorLocalized("Cannot hire a character from location \"" + DisplayName + "\" - hire manager has not been instantiated.\n" + Environment.StackTrace.CleanupStackTrace());
return;
}
@@ -185,7 +185,7 @@ namespace Barotrauma
if (subElement.GetAttribute("sourcerect") == null &&
subElement.GetAttribute("sheetindex") == null)
{
DebugConsole.ThrowError("Warning - sprite sourcerect not configured for structure \"" + Name + "\"!");
DebugConsole.ThrowErrorLocalized("Warning - sprite sourcerect not configured for structure \"" + Name + "\"!");
}
#if CLIENT
if (subElement.GetAttributeBool("fliphorizontal", false))