using Content.Shared.Clothing.EntitySystems; using Content.Shared.Inventory; using Robust.Shared.GameStates; using Robust.Shared.Prototypes; using Robust.Shared.Serialization; namespace Content.Shared.Clothing.Components; /// /// Allow players to change clothing sprite to any other clothing prototype. /// [RegisterComponent, NetworkedComponent, AutoGenerateComponentState(true)] [Access(typeof(SharedChameleonClothingSystem))] public sealed partial class ChameleonClothingComponent : Component { /// /// Filter possible chameleon options by their slot flag. /// [ViewVariables(VVAccess.ReadOnly)] [DataField(required: true)] public SlotFlags Slot; /// /// EntityPrototype id that chameleon item is trying to mimic. /// [ViewVariables(VVAccess.ReadOnly)] [DataField(required: true), AutoNetworkedField] public EntProtoId? Default; /// /// Current user that wears chameleon clothing. /// [ViewVariables] public EntityUid? User; /// /// Filter possible chameleon options by a tag in addition to WhitelistChameleon. /// [DataField] public string? RequireTag; } [Serializable, NetSerializable] public sealed class ChameleonBoundUserInterfaceState : BoundUserInterfaceState { public readonly SlotFlags Slot; public readonly string? SelectedId; public readonly string? RequiredTag; public ChameleonBoundUserInterfaceState(SlotFlags slot, string? selectedId, string? requiredTag) { Slot = slot; SelectedId = selectedId; RequiredTag = requiredTag; } } [Serializable, NetSerializable] public sealed class ChameleonPrototypeSelectedMessage : BoundUserInterfaceMessage { public readonly string SelectedId; public ChameleonPrototypeSelectedMessage(string selectedId) { SelectedId = selectedId; } } [Serializable, NetSerializable] public enum ChameleonUiKey : byte { Key }