Fix heater and freezer temperature range and wrong unit (#15904)

This commit is contained in:
Dawid Bla
2023-04-29 17:31:15 +02:00
committed by GitHub
parent efa205cd5b
commit 217b8a5a38
4 changed files with 11 additions and 11 deletions

View File

@@ -52,7 +52,7 @@ namespace Content.Server.Atmos.Piping.Unary.Components
public float MaxTemperature; public float MaxTemperature;
/// <summary> /// <summary>
/// Minimum temperature the device can reach with a 0 total laser quality. Usually the quality will be at /// Minimum temperature the device can reach with a 0 total capacitor quality. Usually the quality will be at
/// least 1. /// least 1.
/// </summary> /// </summary>
[DataField("baseMinTemperature")] [DataField("baseMinTemperature")]
@@ -60,7 +60,7 @@ namespace Content.Server.Atmos.Piping.Unary.Components
public float BaseMinTemperature = 96.625f; // Selected so that tier-1 parts can reach 73.15k public float BaseMinTemperature = 96.625f; // Selected so that tier-1 parts can reach 73.15k
/// <summary> /// <summary>
/// Maximum temperature the device can reach with a 0 total laser quality. Usually the quality will be at /// Maximum temperature the device can reach with a 0 total capacitor quality. Usually the quality will be at
/// least 1. /// least 1.
/// </summary> /// </summary>
[DataField("baseMaxTemperature")] [DataField("baseMaxTemperature")]

View File

@@ -57,22 +57,22 @@ namespace Content.Server.Atmos.Piping.Unary.EntitySystems
private void OnGasThermoRefreshParts(EntityUid uid, GasThermoMachineComponent thermoMachine, RefreshPartsEvent args) private void OnGasThermoRefreshParts(EntityUid uid, GasThermoMachineComponent thermoMachine, RefreshPartsEvent args)
{ {
var matterBinRating = args.PartRatings[thermoMachine.MachinePartHeatCapacity]; var heatCapacityPartRating = args.PartRatings[thermoMachine.MachinePartHeatCapacity];
var laserRating = args.PartRatings[thermoMachine.MachinePartTemperature]; var temperatureRangePartRating = args.PartRatings[thermoMachine.MachinePartTemperature];
thermoMachine.HeatCapacity = thermoMachine.BaseHeatCapacity * MathF.Pow(matterBinRating, 2); thermoMachine.HeatCapacity = thermoMachine.BaseHeatCapacity * MathF.Pow(heatCapacityPartRating, 2);
switch (thermoMachine.Mode) switch (thermoMachine.Mode)
{ {
// 593.15K with stock parts. // 593.15K with stock parts.
case ThermoMachineMode.Heater: case ThermoMachineMode.Heater:
thermoMachine.MaxTemperature = thermoMachine.BaseMaxTemperature + thermoMachine.MaxTemperatureDelta * laserRating; thermoMachine.MaxTemperature = thermoMachine.BaseMaxTemperature + thermoMachine.MaxTemperatureDelta * temperatureRangePartRating;
thermoMachine.MinTemperature = Atmospherics.T20C; thermoMachine.MinTemperature = Atmospherics.T20C;
break; break;
// 73.15K with stock parts. // 73.15K with stock parts.
case ThermoMachineMode.Freezer: case ThermoMachineMode.Freezer:
thermoMachine.MinTemperature = MathF.Max( thermoMachine.MinTemperature = MathF.Max(
thermoMachine.BaseMinTemperature - thermoMachine.MinTemperatureDelta * laserRating, Atmospherics.TCMB); thermoMachine.BaseMinTemperature - thermoMachine.MinTemperatureDelta * temperatureRangePartRating, Atmospherics.TCMB);
thermoMachine.MaxTemperature = Atmospherics.T20C; thermoMachine.MaxTemperature = Atmospherics.T20C;
break; break;
} }

View File

@@ -1,2 +1,2 @@
# Examine Text # Examine Text
gas-thermomachine-system-examined = The {$machineName} thermostat is set to [color={$tempColor}]{$temp} °C[/color]. gas-thermomachine-system-examined = The {$machineName} thermostat is set to [color={$tempColor}]{$temp} °K[/color].

View File

@@ -1,4 +1,4 @@
- type: entity - type: entity
id: AutolatheMachineCircuitboard id: AutolatheMachineCircuitboard
parent: BaseMachineCircuitboard parent: BaseMachineCircuitboard
name: autolathe machine board name: autolathe machine board
@@ -230,7 +230,7 @@
prototype: GasThermoMachineFreezer prototype: GasThermoMachineFreezer
requirements: requirements:
MatterBin: 2 MatterBin: 2
Manipulator: 2 Capacitor: 2
materialRequirements: materialRequirements:
Cable: 5 Cable: 5
- type: Construction - type: Construction
@@ -250,7 +250,7 @@
prototype: GasThermoMachineHeater prototype: GasThermoMachineHeater
requirements: requirements:
MatterBin: 2 MatterBin: 2
Manipulator: 2 Capacitor: 2
materialRequirements: materialRequirements:
Cable: 5 Cable: 5
- type: Construction - type: Construction