Fix thermal regulation (#35971)

This commit is contained in:
slarticodefast
2025-03-20 23:40:31 +01:00
committed by GitHub
parent 1535fe731a
commit 4d50a5a903

View File

@@ -51,6 +51,7 @@ public sealed class ThermalRegulatorSystem : EntitySystem
if (!Resolve(ent, ref ent.Comp2, logMissing: false))
return;
// TODO: Why do we have two datafields for this if they are only ever used once here?
var totalMetabolismTempChange = ent.Comp1.MetabolismHeat - ent.Comp1.RadiatedHeat;
// implicit heat regulation
@@ -74,7 +75,7 @@ public sealed class ThermalRegulatorSystem : EntitySystem
// if body temperature is not within comfortable, thermal regulation
// processes starts
if (tempDiff > ent.Comp1.ThermalRegulationTemperatureThreshold)
if (tempDiff < ent.Comp1.ThermalRegulationTemperatureThreshold)
return;
if (ent.Comp2.CurrentTemperature > ent.Comp1.NormalBodyTemperature)