Files
tbd-station-14/Content.Shared/Preferences/HumanoidCharacterAppearance.cs
DamianX f19795edaf Added preferences backend (#465)
* Added preferences backend

* Gender -> Sex

* ClientPreferencesManager properties

* Username validation

* Fixed client init

* WIP db

* Actually working sqlite db

* Dropped shitty sqlite libraries, dropped DbUp, added MigrationManager

* Added profile deletion, test

* Docs, sanity, tests, cleanup

* Cleaned up profile and appearance, fixed running on .net core

Co-authored-by: Pieter-Jan Briers <pieterjan.briers@gmail.com>
2019-12-22 13:47:34 +01:00

43 lines
1.5 KiB
C#

using System;
using Robust.Shared.Maths;
using Robust.Shared.Serialization;
namespace Content.Shared.Preferences
{
[Serializable, NetSerializable]
public class HumanoidCharacterAppearance : ICharacterAppearance
{
public string HairStyleName { get; set; }
public Color HairColor { get; set; }
public string FacialHairStyleName { get; set; }
public Color FacialHairColor { get; set; }
public Color EyeColor { get; set; }
public Color SkinColor { get; set; }
public static HumanoidCharacterAppearance Default()
{
return new HumanoidCharacterAppearance
{
HairStyleName = "Bald",
HairColor = Color.Black,
FacialHairStyleName = "Shaved",
FacialHairColor = Color.Black,
EyeColor = Color.Black,
SkinColor = Color.Black
};
}
public bool MemberwiseEquals(ICharacterAppearance maybeOther)
{
if (!(maybeOther is HumanoidCharacterAppearance other)) return false;
if (HairStyleName != other.HairStyleName) return false;
if (HairColor != other.HairColor) return false;
if (FacialHairStyleName != other.FacialHairStyleName) return false;
if (FacialHairColor != other.FacialHairColor) return false;
if (EyeColor != other.EyeColor) return false;
if (SkinColor != other.SkinColor) return false;
return true;
}
}
}