Add a test that creates, deletes and creates a character (#2193)

* Add a test that creates, deletes and creates a character

* My prs conflict with my other prs

Bottom text

* Add checking for profile equality between client and server

* Fix randomizing outside of an assert and add equals/hashcode and fix equality check

* Fix colors being slightly off when received by the server
This commit is contained in:
DrSmugleaf
2020-10-12 18:26:17 +02:00
committed by GitHub
parent 4c72109cdf
commit 43a156bd3b
3 changed files with 156 additions and 13 deletions

View File

@@ -1,3 +1,4 @@
#nullable enable
using System;
using System.Collections.Generic;
using System.Linq;
@@ -243,5 +244,22 @@ namespace Content.Shared.Preferences
if (!_antagPreferences.SequenceEqual(other._antagPreferences)) return false;
return Appearance.MemberwiseEquals(other.Appearance);
}
public override bool Equals(object? obj)
{
return obj is HumanoidCharacterProfile other && MemberwiseEquals(other);
}
public override int GetHashCode()
{
return HashCode.Combine(
Name,
Age,
Sex,
PreferenceUnavailable,
_jobPriorities,
_antagPreferences,
Appearance);
}
}
}