From 217b8a5a384292f40f26266225585d7ab2ac69ae Mon Sep 17 00:00:00 2001
From: Dawid Bla <46636558+DawBla@users.noreply.github.com>
Date: Sat, 29 Apr 2023 17:31:15 +0200
Subject: [PATCH] Fix heater and freezer temperature range and wrong unit
(#15904)
---
.../Unary/Components/GasThermoMachineComponent.cs | 4 ++--
.../Unary/EntitySystems/GasThermoMachineSystem.cs | 10 +++++-----
.../Locale/en-US/atmos/gas-thermomachine-system.ftl | 2 +-
.../Devices/Circuitboards/Machine/production.yml | 6 +++---
4 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/Content.Server/Atmos/Piping/Unary/Components/GasThermoMachineComponent.cs b/Content.Server/Atmos/Piping/Unary/Components/GasThermoMachineComponent.cs
index 72699ef443..f9122caf3c 100644
--- a/Content.Server/Atmos/Piping/Unary/Components/GasThermoMachineComponent.cs
+++ b/Content.Server/Atmos/Piping/Unary/Components/GasThermoMachineComponent.cs
@@ -52,7 +52,7 @@ namespace Content.Server.Atmos.Piping.Unary.Components
public float MaxTemperature;
///
- /// 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.
///
[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
///
- /// 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.
///
[DataField("baseMaxTemperature")]
diff --git a/Content.Server/Atmos/Piping/Unary/EntitySystems/GasThermoMachineSystem.cs b/Content.Server/Atmos/Piping/Unary/EntitySystems/GasThermoMachineSystem.cs
index 9f841bef26..98c68a8bc3 100644
--- a/Content.Server/Atmos/Piping/Unary/EntitySystems/GasThermoMachineSystem.cs
+++ b/Content.Server/Atmos/Piping/Unary/EntitySystems/GasThermoMachineSystem.cs
@@ -57,22 +57,22 @@ namespace Content.Server.Atmos.Piping.Unary.EntitySystems
private void OnGasThermoRefreshParts(EntityUid uid, GasThermoMachineComponent thermoMachine, RefreshPartsEvent args)
{
- var matterBinRating = args.PartRatings[thermoMachine.MachinePartHeatCapacity];
- var laserRating = args.PartRatings[thermoMachine.MachinePartTemperature];
+ var heatCapacityPartRating = args.PartRatings[thermoMachine.MachinePartHeatCapacity];
+ 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)
{
// 593.15K with stock parts.
case ThermoMachineMode.Heater:
- thermoMachine.MaxTemperature = thermoMachine.BaseMaxTemperature + thermoMachine.MaxTemperatureDelta * laserRating;
+ thermoMachine.MaxTemperature = thermoMachine.BaseMaxTemperature + thermoMachine.MaxTemperatureDelta * temperatureRangePartRating;
thermoMachine.MinTemperature = Atmospherics.T20C;
break;
// 73.15K with stock parts.
case ThermoMachineMode.Freezer:
thermoMachine.MinTemperature = MathF.Max(
- thermoMachine.BaseMinTemperature - thermoMachine.MinTemperatureDelta * laserRating, Atmospherics.TCMB);
+ thermoMachine.BaseMinTemperature - thermoMachine.MinTemperatureDelta * temperatureRangePartRating, Atmospherics.TCMB);
thermoMachine.MaxTemperature = Atmospherics.T20C;
break;
}
diff --git a/Resources/Locale/en-US/atmos/gas-thermomachine-system.ftl b/Resources/Locale/en-US/atmos/gas-thermomachine-system.ftl
index b5a44a268c..20b3ec985c 100644
--- a/Resources/Locale/en-US/atmos/gas-thermomachine-system.ftl
+++ b/Resources/Locale/en-US/atmos/gas-thermomachine-system.ftl
@@ -1,2 +1,2 @@
# 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].
diff --git a/Resources/Prototypes/Entities/Objects/Devices/Circuitboards/Machine/production.yml b/Resources/Prototypes/Entities/Objects/Devices/Circuitboards/Machine/production.yml
index 4a8815cce6..33da740127 100644
--- a/Resources/Prototypes/Entities/Objects/Devices/Circuitboards/Machine/production.yml
+++ b/Resources/Prototypes/Entities/Objects/Devices/Circuitboards/Machine/production.yml
@@ -1,4 +1,4 @@
-- type: entity
+- type: entity
id: AutolatheMachineCircuitboard
parent: BaseMachineCircuitboard
name: autolathe machine board
@@ -230,7 +230,7 @@
prototype: GasThermoMachineFreezer
requirements:
MatterBin: 2
- Manipulator: 2
+ Capacitor: 2
materialRequirements:
Cable: 5
- type: Construction
@@ -250,7 +250,7 @@
prototype: GasThermoMachineHeater
requirements:
MatterBin: 2
- Manipulator: 2
+ Capacitor: 2
materialRequirements:
Cable: 5
- type: Construction
--
2.51.2