HealthAnalyzerComponent.cs 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. using Robust.Shared.Audio;
  2. using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom;
  3. namespace Content.Server.Medical.Components;
  4. /// <summary>
  5. /// After scanning, retrieves the target Uid to use with its related UI.
  6. /// </summary>
  7. /// <remarks>
  8. /// Requires <c>ItemToggleComponent</c>.
  9. /// </remarks>
  10. [RegisterComponent, AutoGenerateComponentPause]
  11. [Access(typeof(HealthAnalyzerSystem), typeof(CryoPodSystem))]
  12. public sealed partial class HealthAnalyzerComponent : Component
  13. {
  14. /// <summary>
  15. /// When should the next update be sent for the patient
  16. /// </summary>
  17. [DataField(customTypeSerializer: typeof(TimeOffsetSerializer))]
  18. [AutoPausedField]
  19. public TimeSpan NextUpdate = TimeSpan.Zero;
  20. /// <summary>
  21. /// The delay between patient health updates
  22. /// </summary>
  23. [DataField]
  24. public TimeSpan UpdateInterval = TimeSpan.FromSeconds(1);
  25. /// <summary>
  26. /// How long it takes to scan someone.
  27. /// </summary>
  28. [DataField]
  29. public TimeSpan ScanDelay = TimeSpan.FromSeconds(0.8);
  30. /// <summary>
  31. /// Which entity has been scanned, for continuous updates
  32. /// </summary>
  33. [DataField]
  34. public EntityUid? ScannedEntity;
  35. /// <summary>
  36. /// The maximum range in tiles at which the analyzer can receive continuous updates
  37. /// </summary>
  38. [DataField]
  39. public float MaxScanRange = 2.5f;
  40. /// <summary>
  41. /// Sound played on scanning begin
  42. /// </summary>
  43. [DataField]
  44. public SoundSpecifier? ScanningBeginSound;
  45. /// <summary>
  46. /// Sound played on scanning end
  47. /// </summary>
  48. [DataField]
  49. public SoundSpecifier ScanningEndSound = new SoundPathSpecifier("/Audio/Items/Medical/healthscanner.ogg");
  50. /// <summary>
  51. /// Whether to show up the popup
  52. /// </summary>
  53. [DataField]
  54. public bool Silent;
  55. }