* 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.
100 lines
4.0 KiB
C#
100 lines
4.0 KiB
C#
using Content.Shared.Atmos;
|
|
using Content.Shared.Atmos.Piping.Unary.Components;
|
|
using Content.Shared.Construction.Prototypes;
|
|
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
|
|
|
|
namespace Content.Server.Atmos.Piping.Unary.Components
|
|
{
|
|
[RegisterComponent]
|
|
public sealed class GasThermoMachineComponent : Component
|
|
{
|
|
[DataField("inlet")]
|
|
public string InletName = "pipe";
|
|
|
|
/// <summary>
|
|
/// Current maximum temperature, calculated from <see cref="BaseHeatCapacity"/> and the quality of matter
|
|
/// bins. The heat capacity effectively determines the rate at which the thermo machine can add or remove
|
|
/// heat from a pipenet.
|
|
/// </summary>
|
|
[ViewVariables(VVAccess.ReadWrite)]
|
|
public float HeatCapacity = 10000;
|
|
|
|
/// <summary>
|
|
/// Base heat capacity of the device. Actual heat capacity is calculated by taking this number and doubling
|
|
/// it for every matter bin quality tier above one.
|
|
/// </summary>
|
|
[DataField("baseHeatCapacity")]
|
|
public float BaseHeatCapacity = 5000;
|
|
|
|
[DataField("targetTemperature")]
|
|
[ViewVariables(VVAccess.ReadWrite)]
|
|
public float TargetTemperature = Atmospherics.T20C;
|
|
|
|
[DataField("mode")]
|
|
public ThermoMachineMode Mode = ThermoMachineMode.Freezer;
|
|
|
|
/// <summary>
|
|
/// Current minimum temperature, calculated from <see cref="InitialMinTemperature"/> and <see
|
|
/// cref="MinTemperatureDelta"/>.
|
|
/// </summary>
|
|
[ViewVariables(VVAccess.ReadWrite)]
|
|
public float MinTemperature;
|
|
|
|
/// <summary>
|
|
/// Current maximum temperature, calculated from <see cref="InitialMaxTemperature"/> and <see
|
|
/// cref="MaxTemperatureDelta"/>.
|
|
/// </summary>
|
|
[ViewVariables(VVAccess.ReadWrite)]
|
|
public float MaxTemperature;
|
|
|
|
/// <summary>
|
|
/// Minimum temperature the device can reach with a 0 total capacitor quality. Usually the quality will be at
|
|
/// least 1.
|
|
/// </summary>
|
|
[DataField("baseMinTemperature")]
|
|
[ViewVariables(VVAccess.ReadWrite)]
|
|
public float BaseMinTemperature = 96.625f; // Selected so that tier-1 parts can reach 73.15k
|
|
|
|
/// <summary>
|
|
/// Maximum temperature the device can reach with a 0 total capacitor quality. Usually the quality will be at
|
|
/// least 1.
|
|
/// </summary>
|
|
[DataField("baseMaxTemperature")]
|
|
[ViewVariables(VVAccess.ReadWrite)]
|
|
public float BaseMaxTemperature = Atmospherics.T20C;
|
|
|
|
/// <summary>
|
|
/// Decrease in minimum temperature, per unit machine part quality.
|
|
/// </summary>
|
|
[DataField("minTemperatureDelta")]
|
|
[ViewVariables(VVAccess.ReadWrite)]
|
|
public float MinTemperatureDelta = 23.475f; // selected so that tier-4 parts can reach TCMB
|
|
|
|
/// <summary>
|
|
/// Change in maximum temperature, per unit machine part quality.
|
|
/// </summary>
|
|
[DataField("maxTemperatureDelta")]
|
|
[ViewVariables(VVAccess.ReadWrite)]
|
|
public float MaxTemperatureDelta = 300;
|
|
|
|
/// <summary>
|
|
/// The machine part that affects the heat capacity.
|
|
/// </summary>
|
|
[DataField("machinePartHeatCapacity", customTypeSerializer: typeof(PrototypeIdSerializer<MachinePartPrototype>))]
|
|
public string MachinePartHeatCapacity = "MatterBin";
|
|
|
|
/// <summary>
|
|
/// The machine part that affects the temperature range.
|
|
/// </summary>
|
|
[DataField("machinePartTemperature", customTypeSerializer: typeof(PrototypeIdSerializer<MachinePartPrototype>))]
|
|
public string MachinePartTemperature = "Capacitor";
|
|
|
|
/// <summary>
|
|
/// Last amount of energy added/removed from the attached pipe network
|
|
/// </summary>
|
|
[DataField("lastEnergyDelta")]
|
|
[ViewVariables(VVAccess.ReadWrite)]
|
|
public float LastEnergyDelta;
|
|
}
|
|
}
|