using Content.Shared.Dataset; using Robust.Shared.Prototypes; namespace Content.Server.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, Access(typeof(SpeakOnUIClosedSystem))] 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] public bool Flag; }