Fixed comparable

This commit is contained in:
r00telement
2021-12-20 00:21:24 +00:00
parent 4e915d7eb7
commit 4e5677662a
2 changed files with 7 additions and 2 deletions

View File

@@ -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);
}
}
}

View File

@@ -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();
}
}