MedBookComponent.cs 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  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(MedBookSystem), typeof(CryoPodSystem))]
  12. public sealed partial class MedBookComponent : 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(5);
  30. /// <summary>
  31. /// Which entity has been scanned, for continuous updates
  32. /// </summary>
  33. [DataField]
  34. public EntityUid? ScannedEntity;
  35. /// <summary>
  36. /// Shitmed Change: The body part that is currently being scanned.
  37. /// </summary>
  38. [DataField]
  39. public EntityUid? CurrentBodyPart;
  40. /// <summary>
  41. /// The maximum range in tiles at which the analyzer can receive continuous updates
  42. /// </summary>
  43. [DataField]
  44. public float MaxScanRange = 1.5f;
  45. /// <summary>
  46. /// Whether to show up the popup
  47. /// </summary>
  48. [DataField]
  49. public bool Silent;
  50. }