SurveillanceCameraSpeakerComponent.cs 516 B

12345678910111213141516
  1. namespace Content.Server.SurveillanceCamera;
  2. /// <summary>
  3. /// This allows surveillance cameras to speak, if the camera in question
  4. /// has a microphone that listens to speech.
  5. /// </summary>
  6. [RegisterComponent]
  7. public sealed partial class SurveillanceCameraSpeakerComponent : Component
  8. {
  9. // mostly copied from Speech
  10. [DataField("speechEnabled")] public bool SpeechEnabled = true;
  11. [ViewVariables] public float SpeechSoundCooldown = 0.5f;
  12. public TimeSpan LastSoundPlayed = TimeSpan.Zero;
  13. }