SharedGasVolumePumpComponent.cs 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. using Robust.Shared.Serialization;
  2. namespace Content.Shared.Atmos.Piping.Binary.Components
  3. {
  4. public sealed record GasVolumePumpData(float LastMolesTransferred);
  5. [Serializable, NetSerializable]
  6. public enum GasVolumePumpUiKey
  7. {
  8. Key,
  9. }
  10. [Serializable, NetSerializable]
  11. public sealed class GasVolumePumpBoundUserInterfaceState : BoundUserInterfaceState
  12. {
  13. public string PumpLabel { get; }
  14. public float TransferRate { get; }
  15. public bool Enabled { get; }
  16. public GasVolumePumpBoundUserInterfaceState(string pumpLabel, float transferRate, bool enabled)
  17. {
  18. PumpLabel = pumpLabel;
  19. TransferRate = transferRate;
  20. Enabled = enabled;
  21. }
  22. }
  23. [Serializable, NetSerializable]
  24. public sealed class GasVolumePumpToggleStatusMessage : BoundUserInterfaceMessage
  25. {
  26. public bool Enabled { get; }
  27. public GasVolumePumpToggleStatusMessage(bool enabled)
  28. {
  29. Enabled = enabled;
  30. }
  31. }
  32. [Serializable, NetSerializable]
  33. public sealed class GasVolumePumpChangeTransferRateMessage : BoundUserInterfaceMessage
  34. {
  35. public float TransferRate { get; }
  36. public GasVolumePumpChangeTransferRateMessage(float transferRate)
  37. {
  38. TransferRate = transferRate;
  39. }
  40. }
  41. }