Add internal temperatures for cooking meats (#20659)

This commit is contained in:
deltanedas
2023-10-20 21:21:49 +01:00
committed by GitHub
parent 3a561ed993
commit 68aa295a38
6 changed files with 158 additions and 22 deletions

View File

@@ -35,7 +35,8 @@ public sealed class ThermalRegulatorSystem : EntitySystem
// implicit heat regulation
var tempDiff = Math.Abs(temperatureComponent.CurrentTemperature - comp.NormalBodyTemperature);
var targetHeat = tempDiff * temperatureComponent.HeatCapacity;
var heatCapacity = _tempSys.GetHeatCapacity(uid, temperatureComponent);
var targetHeat = tempDiff * heatCapacity;
if (temperatureComponent.CurrentTemperature > comp.NormalBodyTemperature)
{
totalMetabolismTempChange -= Math.Min(targetHeat, comp.ImplicitHeatRegulation);
@@ -49,7 +50,7 @@ public sealed class ThermalRegulatorSystem : EntitySystem
// recalc difference and target heat
tempDiff = Math.Abs(temperatureComponent.CurrentTemperature - comp.NormalBodyTemperature);
targetHeat = tempDiff * temperatureComponent.HeatCapacity;
targetHeat = tempDiff * heatCapacity;
// if body temperature is not within comfortable, thermal regulation
// processes starts