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 partial class GasThermoMachineComponent : Component { [DataField("inlet")] public string InletName = "pipe"; /// /// Current electrical power consumption, in watts. Increasing power increases the ability of the /// thermomachine to heat or cool air. /// [ViewVariables(VVAccess.ReadWrite)] public float HeatCapacity = 10000; /// /// 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. /// [DataField("baseHeatCapacity")] public float BaseHeatCapacity = 5000; [DataField("targetTemperature")] [ViewVariables(VVAccess.ReadWrite)] public float TargetTemperature = Atmospherics.T20C; /// /// Tolerance for temperature setpoint hysteresis. /// [ViewVariables(VVAccess.ReadOnly)] public float TemperatureTolerance = 2f; /// /// Implements setpoint hysteresis to prevent heater from rapidly cycling on and off at setpoint. /// If true, add Sign(Cp)*TemperatureTolerance to the temperature setpoint. /// [ViewVariables(VVAccess.ReadOnly)] public bool HysteresisState = false; /// /// Coefficient of performance. Output power / input power. /// Positive for heaters, negative for freezers. /// [DataField("coefficientOfPerformance")] [ViewVariables(VVAccess.ReadWrite)] public float Cp = 0.9f; // output power / input power, positive is heat /// /// Current minimum temperature, calculated from and . /// Ignored if heater. /// [ViewVariables(VVAccess.ReadWrite)] public float MinTemperature; /// /// Current maximum temperature, calculated from and . /// Ignored if freezer. /// [ViewVariables(VVAccess.ReadWrite)] public float MaxTemperature; /// /// Minimum temperature the device can reach with a 0 total capacitor quality. Usually the quality will be at /// least 1. /// [DataField("baseMinTemperature")] [ViewVariables(VVAccess.ReadWrite)] public float BaseMinTemperature = 96.625f; // Selected so that tier-1 parts can reach 73.15k /// /// Maximum temperature the device can reach with a 0 total capacitor quality. Usually the quality will be at /// least 1. /// [DataField("baseMaxTemperature")] [ViewVariables(VVAccess.ReadWrite)] public float BaseMaxTemperature = Atmospherics.T20C; /// /// Decrease in minimum temperature, per unit machine part quality. /// [DataField("minTemperatureDelta")] [ViewVariables(VVAccess.ReadWrite)] public float MinTemperatureDelta = 23.475f; // selected so that tier-4 parts can reach TCMB /// /// Change in maximum temperature, per unit machine part quality. /// [DataField("maxTemperatureDelta")] [ViewVariables(VVAccess.ReadWrite)] public float MaxTemperatureDelta = 300; /// /// The machine part that affects the heat capacity. /// [DataField("machinePartHeatCapacity", customTypeSerializer: typeof(PrototypeIdSerializer))] public string MachinePartHeatCapacity = "MatterBin"; /// /// The machine part that affects the temperature range. /// [DataField("machinePartTemperature", customTypeSerializer: typeof(PrototypeIdSerializer))] public string MachinePartTemperature = "Capacitor"; /// /// Last amount of energy added/removed from the attached pipe network /// [DataField("lastEnergyDelta")] [ViewVariables(VVAccess.ReadWrite)] public float LastEnergyDelta; } }