using Content.Shared.Actions; using Content.Shared.Clothing.EntitySystems; using Robust.Shared.GameStates; using Robust.Shared.Prototypes; namespace Content.Shared.Clothing.Components; /// /// Clothing that can be enabled and disabled with an action. /// Requires . /// /// /// Not to be confused with for hardsuit helmets and such. /// [RegisterComponent, NetworkedComponent, AutoGenerateComponentState] [Access(typeof(ToggleClothingSystem))] public sealed partial class ToggleClothingComponent : Component { /// /// The action to add when equipped, even if not worn. /// This must raise to then get handled. /// [DataField(required: true)] public EntProtoId Action = string.Empty; [DataField, AutoNetworkedField] public EntityUid? ActionEntity; /// /// If true, automatically disable the clothing after unequipping it. /// [DataField] public bool DisableOnUnequip; } /// /// Raised on the clothing when being equipped to see if it should add the action. /// [ByRefEvent] public record struct ToggleClothingCheckEvent(EntityUid User, bool Cancelled = false);