CryoPodComponent.cs 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. using Robust.Shared.Containers;
  2. using Robust.Shared.GameStates;
  3. using Robust.Shared.Serialization;
  4. using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom;
  5. namespace Content.Shared.Medical.Cryogenics;
  6. [RegisterComponent, NetworkedComponent]
  7. public sealed partial class CryoPodComponent : Component
  8. {
  9. /// <summary>
  10. /// Specifies the name of the atmospherics port to draw gas from.
  11. /// </summary>
  12. [ViewVariables(VVAccess.ReadWrite)]
  13. [DataField("port")]
  14. public string PortName { get; set; } = "port";
  15. /// <summary>
  16. /// Specifies the name of the slot that holds beaker with medicine.
  17. /// </summary>
  18. [ViewVariables(VVAccess.ReadWrite)]
  19. [DataField("solutionContainerName")]
  20. public string SolutionContainerName { get; set; } = "beakerSlot";
  21. /// <summary>
  22. /// How often (seconds) are chemicals transferred from the beaker to the body?
  23. /// </summary>
  24. [ViewVariables(VVAccess.ReadWrite)]
  25. [DataField("beakerTransferTime")]
  26. public float BeakerTransferTime = 1f;
  27. [ViewVariables(VVAccess.ReadWrite)]
  28. [DataField("nextInjectionTime", customTypeSerializer:typeof(TimeOffsetSerializer))]
  29. public TimeSpan? NextInjectionTime;
  30. /// <summary>
  31. /// How many units to transfer per tick from the beaker to the mob?
  32. /// </summary>
  33. [ViewVariables(VVAccess.ReadWrite)]
  34. [DataField("beakerTransferAmount")]
  35. public float BeakerTransferAmount = 1f;
  36. /// <summary>
  37. /// Delay applied when inserting a mob in the pod.
  38. /// </summary>
  39. [ViewVariables(VVAccess.ReadWrite)]
  40. [DataField("entryDelay")]
  41. public float EntryDelay = 2f;
  42. /// <summary>
  43. /// Delay applied when trying to pry open a locked pod.
  44. /// </summary>
  45. [ViewVariables(VVAccess.ReadWrite)]
  46. [DataField("pryDelay")]
  47. public float PryDelay = 5f;
  48. /// <summary>
  49. /// Container for mobs inserted in the pod.
  50. /// </summary>
  51. [ViewVariables]
  52. public ContainerSlot BodyContainer = default!;
  53. /// <summary>
  54. /// If true, the eject verb will not work on the pod and the user must use a crowbar to pry the pod open.
  55. /// </summary>
  56. [ViewVariables(VVAccess.ReadWrite)]
  57. [DataField("locked")]
  58. public bool Locked { get; set; }
  59. /// <summary>
  60. /// Causes the pod to be locked without being fixable by messing with wires.
  61. /// </summary>
  62. [ViewVariables(VVAccess.ReadWrite)]
  63. [DataField("permaLocked")]
  64. public bool PermaLocked { get; set; }
  65. [Serializable, NetSerializable]
  66. public enum CryoPodVisuals : byte
  67. {
  68. ContainsEntity,
  69. IsOn
  70. }
  71. }