Files
tbd-station-14/Content.Shared/Humanoid/SharedHumanoidMarkingModifierSystem.cs
csqrb 8b3d7728d7 Marking default coloring (#13039)
* Marking coloring WIP

* EnsureDefault now supports coloring!

* Now markings have coloring when they get added

* Many things

* yml files

* cleanup

* Some requested changes

* Nullable type and WIP caching

* Time to resolve that thing with deprecated hair fields

* Latest reviews + im still trying to use these hair markings

* FirstOrDefault thing and Tattoo docs

* IDK

* It's now works a bit more properly in preferences GUI

* THEY SYNCING! However preferences GUI still broken and doesn't work properly

* Markings now updating when changing in GUI. However they still don't work properly with bald humanoids

* Forgor...

* Default hair-colored markings will not color to hair if there is no hair

* Fixed default colors for customizable markings

* Fixed bug in prefs GUI that set current hair to null

* Now markings that must match skin color because of limb (e.x. Slimes) - will match skin color

* final tweaks: if hair uses skin color then markings will use skin color as hair color (slimes)

* fix

* fixed dirty. no more funni invis bug

* Mirrors and client profile loading

* default colors soon TM

* review + better coloring

* Hardcode is gone

* diona markings

* oh my god

* fixed CategoryColoring

* cool fallback, clean up and some other tweaks

* code style

* more style

* a
2023-03-04 18:59:07 -08:00

66 lines
1.9 KiB
C#

using Content.Shared.Humanoid.Markings;
using Robust.Shared.Serialization;
using static Content.Shared.Humanoid.HumanoidAppearanceState;
namespace Content.Shared.Humanoid;
[Serializable, NetSerializable]
public enum HumanoidMarkingModifierKey
{
Key
}
[Serializable, NetSerializable]
public sealed class HumanoidMarkingModifierMarkingSetMessage : BoundUserInterfaceMessage
{
public MarkingSet MarkingSet { get; }
public bool ResendState { get; }
public HumanoidMarkingModifierMarkingSetMessage(MarkingSet set, bool resendState)
{
MarkingSet = set;
ResendState = resendState;
}
}
[Serializable, NetSerializable]
public sealed class HumanoidMarkingModifierBaseLayersSetMessage : BoundUserInterfaceMessage
{
public HumanoidMarkingModifierBaseLayersSetMessage(HumanoidVisualLayers layer, CustomBaseLayerInfo? info, bool resendState)
{
Layer = layer;
Info = info;
ResendState = resendState;
}
public HumanoidVisualLayers Layer { get; }
public CustomBaseLayerInfo? Info { get; }
public bool ResendState { get; }
}
[Serializable, NetSerializable]
public sealed class HumanoidMarkingModifierState : BoundUserInterfaceState
{
// TODO just use the component state, remove the BUI state altogether.
public HumanoidMarkingModifierState(
MarkingSet markingSet,
string species,
Color skinColor,
Dictionary<HumanoidVisualLayers, CustomBaseLayerInfo> customBaseLayers
)
{
MarkingSet = markingSet;
Species = species;
SkinColor = skinColor;
CustomBaseLayers = customBaseLayers;
}
public MarkingSet MarkingSet { get; }
public string Species { get; }
public Color SkinColor { get; }
public Color EyeColor { get; }
public Color? HairColor { get; }
public Color? FacialHairColor { get; }
public Dictionary<HumanoidVisualLayers, CustomBaseLayerInfo> CustomBaseLayers { get; }
}