2023-08-12 22:41:55 +02:00
|
|
|
|
using Content.Shared.Atmos;
|
|
|
|
|
|
|
|
|
|
|
|
namespace Content.Server.Power.Generation.Teg;
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// A "circulator" for the thermo-electric generator (TEG).
|
|
|
|
|
|
/// Circulators are used by the TEG to take in a side of either hot or cold gas.
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <seealso cref="TegSystem"/>
|
|
|
|
|
|
[RegisterComponent]
|
|
|
|
|
|
[Access(typeof(TegSystem))]
|
2023-08-22 18:14:33 -07:00
|
|
|
|
public sealed partial class TegCirculatorComponent : Component
|
2023-08-12 22:41:55 +02:00
|
|
|
|
{
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// The difference between the inlet and outlet pressure at the start of the previous tick.
|
|
|
|
|
|
/// </summary>
|
2023-08-17 11:50:41 -07:00
|
|
|
|
[ViewVariables(VVAccess.ReadWrite)]
|
|
|
|
|
|
[DataField("lastPressureDelta")]
|
2023-08-12 22:41:55 +02:00
|
|
|
|
public float LastPressureDelta;
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// The amount of moles transferred by the circulator last tick.
|
|
|
|
|
|
/// </summary>
|
2023-08-17 11:50:41 -07:00
|
|
|
|
[ViewVariables(VVAccess.ReadWrite)]
|
|
|
|
|
|
[DataField("lastMolesTransferred")]
|
2023-08-12 22:41:55 +02:00
|
|
|
|
public float LastMolesTransferred;
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Minimum pressure delta between inlet and outlet for which the circulator animation speed is "fast".
|
|
|
|
|
|
/// </summary>
|
2023-08-17 11:50:41 -07:00
|
|
|
|
[ViewVariables(VVAccess.ReadWrite)]
|
|
|
|
|
|
[DataField("visualSpeedDelta")]
|
2023-08-12 22:41:55 +02:00
|
|
|
|
public float VisualSpeedDelta = 5 * Atmospherics.OneAtmosphere;
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Light color of this circulator when it's running at "slow" speed.
|
|
|
|
|
|
/// </summary>
|
2023-08-17 11:50:41 -07:00
|
|
|
|
[ViewVariables(VVAccess.ReadWrite)]
|
|
|
|
|
|
[DataField("lightColorSlow")]
|
|
|
|
|
|
public Color LightColorSlow = Color.FromHex("#FF3300");
|
2023-08-12 22:41:55 +02:00
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Light color of this circulator when it's running at "fast" speed.
|
|
|
|
|
|
/// </summary>
|
2023-08-17 11:50:41 -07:00
|
|
|
|
[ViewVariables(VVAccess.ReadWrite)]
|
|
|
|
|
|
[DataField("lightColorFast")]
|
|
|
|
|
|
public Color LightColorFast = Color.FromHex("#AA00FF");
|
2023-08-12 22:41:55 +02:00
|
|
|
|
}
|