* Basic TEG start. Connects via node group. * Basic TEG test map * Sensor monitoring basics, TEG circulator flow * Basic power generation (it doesn't work) * More sensor monitoring work * Battery (SMES) monitoring system. * Sensor monitoring fixes Make it work properly when mapped. * Test map improvements * Revise TEG power output mechanism. Now uses a fixed supplier with a custom ramping system. * TEG test map fixes * Make air alarms and pumps open UI on activate. * Clean up thermo machines power switch. Removed separate Enabled bool from the component that always matched the power receiver's state. This enables adding a PowerSwitch component to give us alt click/verb menu. * TEG but now fancy * Make sensor monitoring console obviously WiP to mappers. * Vending machine sound, because of course. * Terrible, terrible graph background color * Examine improvements for the TEG. * Account for electrical power when equalizing gas mixtures. * Get rid of the TegCirculatorArrow logic. Use TimedDespawn instead. The "no show in right-click menuu" goes into a new general-purpose component. Thanks Julian. * Put big notice of "not ready, here's why" on the sensor monitoring console. * TryGetComponent -> TryComp * Lol there's a HideContextMenu tag * Test fixes * Guidebook for TEG Fixed rotation on GuideEntityEmbed not working correctly. Added Margin property to GuideEntityEmbed * Make TEG power bar default to invisible. So it doesn't appear in the guidebook and spawn menu.
70 lines
2.5 KiB
C#
70 lines
2.5 KiB
C#
namespace Content.Server.Power.Generation.Teg;
|
|
|
|
/// <summary>
|
|
/// The centerpiece for the thermo-electric generator (TEG).
|
|
/// </summary>
|
|
/// <seealso cref="TegSystem"/>
|
|
[RegisterComponent]
|
|
[Access(typeof(TegSystem))]
|
|
public sealed class TegGeneratorComponent : Component
|
|
{
|
|
/// <summary>
|
|
/// When transferring energy from the hot to cold side,
|
|
/// determines how much of that energy can be extracted as electricity.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// A value of 0.9 means that 90% of energy transferred goes to electricity.
|
|
/// </remarks>
|
|
[ViewVariables(VVAccess.ReadWrite)] [DataField("thermal_efficiency")]
|
|
public float ThermalEfficiency = 0.65f;
|
|
|
|
/// <summary>
|
|
/// Simple factor that scales effective electricity generation.
|
|
/// </summary>
|
|
[ViewVariables(VVAccess.ReadWrite)] [DataField("power_factor")]
|
|
public float PowerFactor = 1;
|
|
|
|
/// <summary>
|
|
/// Amount of energy (Joules) generated by the TEG last atmos tick.
|
|
/// </summary>
|
|
[ViewVariables(VVAccess.ReadWrite)] [DataField("last_generation")]
|
|
public float LastGeneration;
|
|
|
|
/// <summary>
|
|
/// The current target for TEG power generation.
|
|
/// Drifts towards actual power draw of the network with <see cref="PowerFactor"/>.
|
|
/// </summary>
|
|
[ViewVariables(VVAccess.ReadWrite)] [DataField("ramp_position")]
|
|
public float RampPosition;
|
|
|
|
/// <summary>
|
|
/// Factor by which TEG power generation scales, both up and down.
|
|
/// </summary>
|
|
[ViewVariables(VVAccess.ReadWrite)] [DataField("ramp_factor")]
|
|
public float RampFactor = 1.05f;
|
|
|
|
/// <summary>
|
|
/// Minimum position for the ramp. Avoids TEG taking too long to start.
|
|
/// </summary>
|
|
[ViewVariables(VVAccess.ReadWrite)] [DataField("ramp_threshold")]
|
|
public float RampMinimum = 5000;
|
|
|
|
/// <summary>
|
|
/// Power output value at which the sprite appearance and sound volume should cap out.
|
|
/// </summary>
|
|
[ViewVariables(VVAccess.ReadWrite)] [DataField("max_visual_power")]
|
|
public float MaxVisualPower = 200_000;
|
|
|
|
/// <summary>
|
|
/// Minimum ambient sound volume, when we're producing just barely any power at all.
|
|
/// </summary>
|
|
[ViewVariables(VVAccess.ReadWrite)] [DataField("volume_min")]
|
|
public float VolumeMin = -9;
|
|
|
|
/// <summary>
|
|
/// Maximum ambient sound volume, when we're producing >= <see cref="MaxVisualPower"/> power.
|
|
/// </summary>
|
|
[ViewVariables(VVAccess.ReadWrite)] [DataField("volume_max")]
|
|
public float VolumeMax = -4;
|
|
}
|