Build 0.20.0.0
This commit is contained in:
@@ -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; }
|
||||
|
||||
Reference in New Issue
Block a user