Unstable v0.19.5.0

This commit is contained in:
Juan Pablo Arce
2022-09-14 12:47:17 -03:00
parent 3f2c843247
commit 1fd2a51bbb
158 changed files with 5702 additions and 4813 deletions
@@ -280,5 +280,29 @@ namespace Barotrauma
return AllowedLinks.Contains(target.Identifier) || target.AllowedLinks.Contains(Identifier)
|| target.Tags.Any(t => AllowedLinks.Contains(t)) || Tags.Any(t => target.AllowedLinks.Contains(t));
}
protected void LoadDescription(ContentXElement element)
{
Identifier descriptionIdentifier = element.GetAttributeIdentifier("descriptionidentifier", "");
Identifier nameIdentifier = element.GetAttributeIdentifier("nameidentifier", "");
string originalDescription = Description.Value;
if (descriptionIdentifier != Identifier.Empty)
{
Description = TextManager.Get($"EntityDescription.{descriptionIdentifier}");
}
else if (nameIdentifier == Identifier.Empty)
{
Description = TextManager.Get($"EntityDescription.{Identifier}");
}
else
{
Description = TextManager.Get($"EntityDescription.{nameIdentifier}");
}
if (!originalDescription.IsNullOrEmpty())
{
Description = Description.Fallback(originalDescription);
}
}
}
}