Build 0.20.0.0

This commit is contained in:
Markus Isberg
2022-10-27 17:54:57 +03:00
parent 05c7b1f869
commit edaf4b09fe
197 changed files with 4344 additions and 1773 deletions
@@ -214,6 +214,7 @@ namespace Barotrauma
return splitValue;
}
public static Identifier[] GetAttributeIdentifierArray(this XElement element, string name, Identifier[] defaultValue, bool trim = true)
{
return element.GetAttributeStringArray(name, null, trim: trim, convertToLowerInvariant: false)
@@ -221,6 +222,12 @@ namespace Barotrauma
?? defaultValue;
}
public static ImmutableHashSet<Identifier> GetAttributeIdentifierImmutableHashSet(this XElement element, string key, ImmutableHashSet<Identifier> defaultValue, bool trim = true)
{
return element.GetAttributeIdentifierArray(key, null, trim)?.ToImmutableHashSet()
?? defaultValue;
}
public static float GetAttributeFloat(this XElement element, float defaultValue, params string[] matchingAttributeName)
{
if (element == null) { return defaultValue; }