Severely nerf fires and severely buff fire protection (#5396)
* Make fires do less damage * Severely nerf fires and severely buff temperature protection * fuck it, i'll nerf it so hard and we can buff it later if we decide * new scaling func * fix * unused * reviews + balance metabolism heat + reduce atmos air temp transfer efficiency * little more balance * just a wee bit more * slight adjustment
This commit is contained in:
@@ -240,25 +240,25 @@ namespace Content.Server.Body.Components
|
||||
{
|
||||
var temperatureSystem = EntitySystem.Get<TemperatureSystem>();
|
||||
if (!Owner.TryGetComponent(out TemperatureComponent? temperatureComponent)) return;
|
||||
temperatureSystem.ReceiveHeat(Owner.Uid, MetabolismHeat, temperatureComponent);
|
||||
temperatureSystem.RemoveHeat(Owner.Uid, RadiatedHeat, temperatureComponent);
|
||||
|
||||
float totalMetabolismTempChange = MetabolismHeat - RadiatedHeat;
|
||||
// implicit heat regulation
|
||||
var tempDiff = Math.Abs(temperatureComponent.CurrentTemperature - NormalBodyTemperature);
|
||||
var targetHeat = tempDiff * temperatureComponent.HeatCapacity;
|
||||
if (temperatureComponent.CurrentTemperature > NormalBodyTemperature)
|
||||
{
|
||||
temperatureSystem.RemoveHeat(Owner.Uid, Math.Min(targetHeat, ImplicitHeatRegulation), temperatureComponent);
|
||||
totalMetabolismTempChange -= Math.Min(targetHeat, ImplicitHeatRegulation);
|
||||
}
|
||||
else
|
||||
{
|
||||
temperatureSystem.ReceiveHeat(Owner.Uid, Math.Min(targetHeat, ImplicitHeatRegulation), temperatureComponent);
|
||||
totalMetabolismTempChange += Math.Min(targetHeat, ImplicitHeatRegulation);
|
||||
}
|
||||
|
||||
// recalc difference and target heat
|
||||
tempDiff = Math.Abs(temperatureComponent.CurrentTemperature - NormalBodyTemperature);
|
||||
targetHeat = tempDiff * temperatureComponent.HeatCapacity;
|
||||
|
||||
temperatureSystem.ChangeHeat(Owner.Uid, totalMetabolismTempChange, true, temperatureComponent);
|
||||
|
||||
// if body temperature is not within comfortable, thermal regulation
|
||||
// processes starts
|
||||
if (tempDiff < ThermalRegulationTemperatureThreshold)
|
||||
@@ -273,7 +273,6 @@ namespace Content.Server.Body.Components
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
var actionBlocker = EntitySystem.Get<ActionBlockerSystem>();
|
||||
|
||||
if (temperatureComponent.CurrentTemperature > NormalBodyTemperature)
|
||||
@@ -288,7 +287,7 @@ namespace Content.Server.Body.Components
|
||||
// creadth: sweating does not help in airless environment
|
||||
if (EntitySystem.Get<AtmosphereSystem>().GetTileMixture(Owner.Transform.Coordinates) is not {})
|
||||
{
|
||||
temperatureSystem.RemoveHeat(OwnerUid, Math.Min(targetHeat, SweatHeatRegulation), temperatureComponent);
|
||||
temperatureSystem.ChangeHeat(OwnerUid, -Math.Min(targetHeat, SweatHeatRegulation), true, temperatureComponent);
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -300,7 +299,7 @@ namespace Content.Server.Body.Components
|
||||
_isShivering = true;
|
||||
}
|
||||
|
||||
temperatureSystem.ReceiveHeat(OwnerUid, Math.Min(targetHeat, ShiveringHeatRegulation), temperatureComponent);
|
||||
temperatureSystem.ChangeHeat(OwnerUid, Math.Min(targetHeat, ShiveringHeatRegulation), true, temperatureComponent);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user