Fixed comparable
This commit is contained in:
@@ -4,7 +4,7 @@ namespace PlayerTags.Data
|
||||
{
|
||||
// FirstName LastName
|
||||
// FirstName LastName:Id
|
||||
public struct Identity : IEquatable<Identity>
|
||||
public struct Identity : IComparable<Identity>, IEquatable<Identity>
|
||||
{
|
||||
public string Name;
|
||||
public string? Id;
|
||||
@@ -70,5 +70,10 @@ namespace PlayerTags.Data
|
||||
|
||||
return hashCode;
|
||||
}
|
||||
|
||||
public int CompareTo(Identity other)
|
||||
{
|
||||
return Name.CompareTo(other.Name);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -158,7 +158,7 @@ namespace PlayerTags.Data
|
||||
return new string[] { };
|
||||
}
|
||||
|
||||
return GameObjectNamesToApplyTo.InheritedValue.Split(';', ',').Where(item => !string.IsNullOrEmpty(item)).ToArray();
|
||||
return GameObjectNamesToApplyTo.InheritedValue.Split(';', ',').Where(item => !string.IsNullOrEmpty(item)).Select(item => item.Trim()).ToArray();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user