using Content.Shared.Advertise.Systems; using Content.Shared.Dataset; using Robust.Shared.GameStates; using Robust.Shared.Prototypes; namespace Content.Shared.Advertise.Components; /// /// Causes the entity to speak using the Chat system when its ActivatableUI is closed, optionally /// requiring that a Flag be set as well. /// [RegisterComponent, NetworkedComponent, AutoGenerateComponentState, Access(typeof(SharedSpeakOnUIClosedSystem))] public sealed partial class SpeakOnUIClosedComponent : Component { /// /// The identifier for the dataset prototype containing messages to be spoken by this entity. /// [DataField(required: true)] public ProtoId Pack { get; private set; } /// /// Is this component active? If false, no messages will be spoken. /// [DataField] public bool Enabled = true; /// /// Should messages be spoken only if the is set (true), or every time the UI is closed (false)? /// [DataField] public bool RequireFlag = true; /// /// State variable only used if is true. Set with . /// [DataField, AutoNetworkedField] public bool Flag; }