CatStation/Content.Client/Toggleable/ToggleableVisualsComponent.cs
Whatstone 62c4f75083
Monkey sprites for the color jumpsuit, default ClothingVisuals checks for equipper species (#44189)
* ClientClothing: check for species in ClothingVisuals

* Remove unused dict

* 4-space meta.json

* Run CheckForSpeciesSpcfcLayers in RenderEquipment

* cleanup default clothing visuals

* comments

* that, not which

* wrong entity doofus

* ClothingCleanup, apply AJCM's suggestions

Co-authored-by: AJCM-git <60196617+AJCM-git@users.noreply.github.com>

* the alphabet

* wrong entity doofus

* writing a few comments

* AJCM suggestions, part two

Co-authored-by: AJCM-git <60196617+AJCM-git@users.noreply.github.com>

* accidental double caps

* comments!

---------

Co-authored-by: AJCM-git <60196617+AJCM-git@users.noreply.github.com>
2026-08-11 01:34:12 +00:00

34 lines
1.4 KiB
C#

using Content.Shared.Hands.Components;
namespace Content.Client.Toggleable;
/// <summary>
/// Component that handles toggling the visuals of an entity, including layers on an entity's sprite,
/// the in-hand visuals, and the clothing/equipment visuals.
/// </summary>
/// <see cref="ToggleableVisualsSystem"/>
[RegisterComponent]
public sealed partial class ToggleableVisualsComponent : Component
{
/// <summary>
/// Sprite layer that will have its visibility toggled when this item is toggled.
/// </summary>
[DataField(required: true)]
public string? SpriteLayer;
/// <summary>
/// Layers to add to the sprite of the player that is holding this entity (while the component is toggled on).
/// </summary>
[DataField]
public Dictionary<HandLocation, List<PrototypeLayerData>> InhandVisuals = new();
/// <summary>
/// A set of clothing visuals per layer by the name of the inventory slot (e.g. "head").
/// Species-specific layers are expected at the name of the layer suffixed with the species (e.g. "head-vox")
/// NOTE: if your species-specific layers consist entirely of default layers or layers
/// suffixed with your species (e.g. "helmet-unshaded" to "helmet-unshaded-vox")
/// this can be omitted entirely!
/// </summary>
[DataField]
public Dictionary<string, List<PrototypeLayerData>> ClothingVisuals = new();
}