TegCirculatorComponent.cs 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. using Content.Shared.Atmos;
  2. namespace Content.Server.Power.Generation.Teg;
  3. /// <summary>
  4. /// A "circulator" for the thermo-electric generator (TEG).
  5. /// Circulators are used by the TEG to take in a side of either hot or cold gas.
  6. /// </summary>
  7. /// <seealso cref="TegSystem"/>
  8. [RegisterComponent]
  9. [Access(typeof(TegSystem))]
  10. public sealed partial class TegCirculatorComponent : Component
  11. {
  12. /// <summary>
  13. /// The difference between the inlet and outlet pressure at the start of the previous tick.
  14. /// </summary>
  15. [ViewVariables(VVAccess.ReadWrite)]
  16. [DataField("lastPressureDelta")]
  17. public float LastPressureDelta;
  18. /// <summary>
  19. /// The amount of moles transferred by the circulator last tick.
  20. /// </summary>
  21. [ViewVariables(VVAccess.ReadWrite)]
  22. [DataField("lastMolesTransferred")]
  23. public float LastMolesTransferred;
  24. /// <summary>
  25. /// Minimum pressure delta between inlet and outlet for which the circulator animation speed is "fast".
  26. /// </summary>
  27. [ViewVariables(VVAccess.ReadWrite)]
  28. [DataField("visualSpeedDelta")]
  29. public float VisualSpeedDelta = 5 * Atmospherics.OneAtmosphere;
  30. /// <summary>
  31. /// Light color of this circulator when it's running at "slow" speed.
  32. /// </summary>
  33. [ViewVariables(VVAccess.ReadWrite)]
  34. [DataField("lightColorSlow")]
  35. public Color LightColorSlow = Color.FromHex("#FF3300");
  36. /// <summary>
  37. /// Light color of this circulator when it's running at "fast" speed.
  38. /// </summary>
  39. [ViewVariables(VVAccess.ReadWrite)]
  40. [DataField("lightColorFast")]
  41. public Color LightColorFast = Color.FromHex("#AA00FF");
  42. }