using Robust.Shared.GameStates; namespace Content.Shared.Trigger.Components.Triggers; /// /// Sends a trigger when the keyphrase is heard. /// The User is the speaker. /// [RegisterComponent, NetworkedComponent, AutoGenerateComponentState] public sealed partial class TriggerOnVoiceComponent : BaseTriggerOnXComponent { /// /// Whether or not the component is actively listening at the moment. /// [ViewVariables] public bool IsListening => IsRecording || !string.IsNullOrWhiteSpace(KeyPhrase); /// /// The keyphrase that has been set to trigger it. /// [DataField, AutoNetworkedField] public string? KeyPhrase; /// /// Range in which we listen for the keyphrase. /// [DataField, AutoNetworkedField] public int ListenRange = 4; /// /// Whether we are currently recording a new keyphrase. /// [DataField, AutoNetworkedField] public bool IsRecording; /// /// Minimum keyphrase length. /// [DataField, AutoNetworkedField] public int MinLength = 3; /// /// Maximum keyphrase length. /// [DataField, AutoNetworkedField] public int MaxLength = 50; }