SharedVentScrubberComponent.cs 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  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 GasVentScrubberData : IAtmosDeviceData
  7. {
  8. public bool Enabled { get; set; }
  9. public bool Dirty { get; set; }
  10. public bool IgnoreAlarms { get; set; } = false;
  11. public HashSet<Gas> FilterGases { get; set; } = new(DefaultFilterGases);
  12. public ScrubberPumpDirection PumpDirection { get; set; } = ScrubberPumpDirection.Scrubbing;
  13. public float VolumeRate { get; set; } = 200f;
  14. public bool WideNet { get; set; } = false;
  15. public static HashSet<Gas> DefaultFilterGases = new()
  16. {
  17. Gas.CarbonDioxide,
  18. Gas.Plasma,
  19. Gas.Tritium,
  20. Gas.WaterVapor,
  21. Gas.Ammonia,
  22. Gas.NitrousOxide,
  23. Gas.Frezon
  24. };
  25. // Presets for 'dumb' air alarm modes
  26. public static GasVentScrubberData FilterModePreset = new GasVentScrubberData
  27. {
  28. Enabled = true,
  29. FilterGases = new(GasVentScrubberData.DefaultFilterGases),
  30. PumpDirection = ScrubberPumpDirection.Scrubbing,
  31. VolumeRate = 200f,
  32. WideNet = false
  33. };
  34. public static GasVentScrubberData WideFilterModePreset = new GasVentScrubberData
  35. {
  36. Enabled = true,
  37. FilterGases = new(GasVentScrubberData.DefaultFilterGases),
  38. PumpDirection = ScrubberPumpDirection.Scrubbing,
  39. VolumeRate = 200f,
  40. WideNet = true
  41. };
  42. public static GasVentScrubberData FillModePreset = new GasVentScrubberData
  43. {
  44. Enabled = false,
  45. Dirty = true,
  46. FilterGases = new(GasVentScrubberData.DefaultFilterGases),
  47. PumpDirection = ScrubberPumpDirection.Scrubbing,
  48. VolumeRate = 200f,
  49. WideNet = false
  50. };
  51. public static GasVentScrubberData PanicModePreset = new GasVentScrubberData
  52. {
  53. Enabled = true,
  54. Dirty = true,
  55. FilterGases = new(GasVentScrubberData.DefaultFilterGases),
  56. PumpDirection = ScrubberPumpDirection.Siphoning,
  57. VolumeRate = 200f,
  58. WideNet = false
  59. };
  60. public static GasVentScrubberData ReplaceModePreset = new GasVentScrubberData
  61. {
  62. Enabled = true,
  63. IgnoreAlarms = true,
  64. Dirty = true,
  65. FilterGases = new(GasVentScrubberData.DefaultFilterGases),
  66. PumpDirection = ScrubberPumpDirection.Siphoning,
  67. VolumeRate = 200f,
  68. WideNet = false
  69. };
  70. }
  71. [Serializable, NetSerializable]
  72. public enum ScrubberPumpDirection : sbyte
  73. {
  74. Siphoning = 0,
  75. Scrubbing = 1,
  76. }
  77. }