using System.Linq; using Content.Shared.Humanoid.Prototypes; using Content.Shared.Preferences; using Robust.Shared.Enums; using Robust.Shared.Prototypes; using Robust.Shared.Serialization; using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype; namespace Content.Shared.Humanoid; public abstract class SharedHumanoidComponent : Component { /// /// Current species. Dictates things like base body sprites, /// base humanoid to spawn, etc. /// [DataField("species", customTypeSerializer: typeof(PrototypeIdSerializer))] public string Species { get; set; } = default!; /// /// The initial profile and base layers to apply to this humanoid. /// [DataField("initial", customTypeSerializer: typeof(PrototypeIdSerializer))] public string Initial { get; } = default!; /// /// Skin color of this humanoid. /// [DataField("skinColor")] public Color SkinColor { get; set; } = Color.FromHex("#C0967F"); /// /// Visual layers currently hidden. This will affect the base sprite /// on this humanoid layer, and any markings that sit above it. /// [ViewVariables] public readonly HashSet HiddenLayers = new(); [DataField("sex")] public Sex Sex = Sex.Male; } [DataDefinition] [Serializable, NetSerializable] public sealed class CustomBaseLayerInfo { public CustomBaseLayerInfo(string id, Color color) { ID = id; Color = color; } /// /// ID of this custom base layer. Must be a . /// [DataField("id")] public string ID { get; } /// /// Color of this custom base layer. /// [DataField("color")] public Color Color { get; } }