HideLayerClothingComponent.cs 1.1 KB

1234567891011121314151617181920212223242526272829303132
  1. using Content.Shared.Humanoid;
  2. using Content.Shared.Inventory;
  3. using Robust.Shared.GameStates;
  4. namespace Content.Shared.Clothing.Components;
  5. /// <summary>
  6. /// This is used for a clothing item that hides an appearance layer.
  7. /// The entity's HumanoidAppearance component must have the corresponding hideLayerOnEquip value.
  8. /// </summary>
  9. [RegisterComponent, NetworkedComponent]
  10. public sealed partial class HideLayerClothingComponent : Component
  11. {
  12. /// <summary>
  13. /// The appearance layer(s) to hide. Use <see cref='Layers'>Layers</see> instead.
  14. /// </summary>
  15. [DataField]
  16. [Obsolete("This attribute is deprecated, please use Layers instead.")]
  17. public HashSet<HumanoidVisualLayers>? Slots;
  18. /// <summary>
  19. /// A map of the appearance layer(s) to hide, and the equipment slot that should hide them.
  20. /// </summary>
  21. [DataField]
  22. public Dictionary<HumanoidVisualLayers, SlotFlags> Layers = new();
  23. /// <summary>
  24. /// If true, the layer will only hide when the item is in a toggled state (e.g. masks)
  25. /// </summary>
  26. [DataField]
  27. public bool HideOnToggle = false;
  28. }