1
0

RingerComponent.cs 966 B

123456789101112131415161718192021222324252627282930313233343536
  1. using Content.Shared.PDA;
  2. namespace Content.Server.PDA.Ringer
  3. {
  4. [RegisterComponent]
  5. public sealed partial class RingerComponent : Component
  6. {
  7. [DataField("ringtone")]
  8. public Note[] Ringtone = new Note[SharedRingerSystem.RingtoneLength];
  9. [DataField("timeElapsed")]
  10. public float TimeElapsed = 0;
  11. /// <summary>
  12. /// Keeps track of how many notes have elapsed if the ringer component is playing.
  13. /// </summary>
  14. [DataField("noteCount")]
  15. public int NoteCount = 0;
  16. /// <summary>
  17. /// How far the sound projects in metres.
  18. /// </summary>
  19. [ViewVariables(VVAccess.ReadWrite)]
  20. [DataField("range")]
  21. public float Range = 3f;
  22. [ViewVariables(VVAccess.ReadWrite)]
  23. [DataField("volume")]
  24. public float Volume = -4f;
  25. }
  26. [RegisterComponent]
  27. public sealed partial class ActiveRingerComponent : Component
  28. {
  29. }
  30. }