1
0

SharedVentPumpComponent.cs 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. using Content.Shared.Atmos.Monitor.Components;
  2. using Robust.Shared.Serialization;
  3. namespace Content.Shared.Atmos.Piping.Unary.Components
  4. {
  5. [Serializable, NetSerializable]
  6. public sealed class GasVentPumpData : IAtmosDeviceData
  7. {
  8. public bool Enabled { get; set; }
  9. public bool Dirty { get; set; }
  10. public bool IgnoreAlarms { get; set; } = false;
  11. public VentPumpDirection PumpDirection { get; set; } = VentPumpDirection.Releasing;
  12. public VentPressureBound PressureChecks { get; set; } = VentPressureBound.ExternalBound;
  13. public float ExternalPressureBound { get; set; } = Atmospherics.OneAtmosphere;
  14. public float InternalPressureBound { get; set; } = 0f;
  15. public bool PressureLockoutOverride { get; set; } = false;
  16. // Presets for 'dumb' air alarm modes
  17. public static GasVentPumpData FilterModePreset = new GasVentPumpData
  18. {
  19. Enabled = true,
  20. PumpDirection = VentPumpDirection.Releasing,
  21. PressureChecks = VentPressureBound.ExternalBound,
  22. ExternalPressureBound = Atmospherics.OneAtmosphere,
  23. InternalPressureBound = 0f,
  24. PressureLockoutOverride = false
  25. };
  26. public static GasVentPumpData FillModePreset = new GasVentPumpData
  27. {
  28. Enabled = true,
  29. Dirty = true,
  30. PumpDirection = VentPumpDirection.Releasing,
  31. PressureChecks = VentPressureBound.ExternalBound,
  32. ExternalPressureBound = Atmospherics.OneAtmosphere * 50,
  33. InternalPressureBound = 0f,
  34. PressureLockoutOverride = true
  35. };
  36. public static GasVentPumpData PanicModePreset = new GasVentPumpData
  37. {
  38. Enabled = false,
  39. Dirty = true,
  40. PumpDirection = VentPumpDirection.Releasing,
  41. PressureChecks = VentPressureBound.ExternalBound,
  42. ExternalPressureBound = Atmospherics.OneAtmosphere,
  43. InternalPressureBound = 0f,
  44. PressureLockoutOverride = false
  45. };
  46. public static GasVentPumpData ReplaceModePreset = new GasVentPumpData
  47. {
  48. Enabled = false,
  49. IgnoreAlarms = true,
  50. Dirty = true,
  51. PumpDirection = VentPumpDirection.Releasing,
  52. PressureChecks = VentPressureBound.ExternalBound,
  53. ExternalPressureBound = Atmospherics.OneAtmosphere,
  54. InternalPressureBound = 0f,
  55. PressureLockoutOverride = false
  56. };
  57. }
  58. [Serializable, NetSerializable]
  59. public enum VentPumpDirection : sbyte
  60. {
  61. Siphoning = 0,
  62. Releasing = 1,
  63. }
  64. [Flags]
  65. [Serializable, NetSerializable]
  66. public enum VentPressureBound : sbyte
  67. {
  68. NoBound = 0,
  69. InternalBound = 1,
  70. ExternalBound = 2,
  71. Both = 3,
  72. }
  73. }