PortableScrubberComponent.cs 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. using Content.Shared.Atmos;
  2. using Content.Shared.Guidebook;
  3. namespace Content.Server.Atmos.Portable
  4. {
  5. [RegisterComponent]
  6. public sealed partial class PortableScrubberComponent : Component
  7. {
  8. /// <summary>
  9. /// The air inside this machine.
  10. /// </summary>
  11. [DataField("gasMixture"), ViewVariables(VVAccess.ReadWrite)]
  12. public GasMixture Air { get; private set; } = new();
  13. [DataField("port"), ViewVariables(VVAccess.ReadWrite)]
  14. public string PortName { get; set; } = "port";
  15. /// <summary>
  16. /// Which gases this machine will scrub out.
  17. /// Unlike fixed scrubbers controlled by an air alarm,
  18. /// this can't be changed in game.
  19. /// </summary>
  20. [DataField("filterGases")]
  21. public HashSet<Gas> FilterGases = new()
  22. {
  23. Gas.CarbonDioxide,
  24. Gas.Plasma,
  25. Gas.Tritium,
  26. Gas.WaterVapor,
  27. Gas.Ammonia,
  28. Gas.NitrousOxide,
  29. Gas.Frezon
  30. };
  31. [ViewVariables(VVAccess.ReadWrite)]
  32. public bool Enabled = true;
  33. /// <summary>
  34. /// Maximum internal pressure before it refuses to take more.
  35. /// </summary>
  36. [DataField, ViewVariables(VVAccess.ReadWrite)]
  37. public float MaxPressure = 2500;
  38. /// <summary>
  39. /// The speed at which gas is scrubbed from the environment.
  40. /// </summary>
  41. [DataField, ViewVariables(VVAccess.ReadWrite)]
  42. public float TransferRate = 800;
  43. #region GuidebookData
  44. [GuidebookData]
  45. public float Volume => Air.Volume;
  46. #endregion
  47. }
  48. }