Misc Atmos Improvements (#5613)

* Revert "Remove atmos archiving."

This reverts commit 7fa10bd17b.

* Explosive Depressurization now brings tiles down to TCMB.

* Tiles now specify heat capacity.

* Do not serialize archived gas mixture values.

* Remove bad idea

* dumb typo

* Space gas mixtures now have a harcoded heat capacity.
This is a bit of a hack, but rooms exposed to space now cool down properly when monstermos is disabled.
Huge thanks to @LemonInTheDark for helping me with this!

* Clean up heat capacity methods

* Better logging based on the original monstermos' logging

* Comment explosive depressurization hack better
This commit is contained in:
Vera Aguilera Puerto
2021-11-30 11:42:48 +01:00
committed by GitHub
parent 9db2fbefe1
commit 94fa6efefb
11 changed files with 157 additions and 31 deletions

View File

@@ -21,6 +21,9 @@ namespace Content.Server.Atmos.EntitySystems
if (adjacent == null || adjacent.ThermalConductivity == 0f)
continue;
if(adjacent.ArchivedCycle < gridAtmosphere.UpdateCounter)
Archive(adjacent, gridAtmosphere.UpdateCounter);
NeighborConductWithSource(gridAtmosphere, adjacent, tile);
ConsiderSuperconductivity(gridAtmosphere, adjacent);
@@ -34,6 +37,8 @@ namespace Content.Server.Atmos.EntitySystems
{
if(tile.Air == null)
{
if(tile.ArchivedCycle < gridAtmosphere.UpdateCounter)
Archive(tile, gridAtmosphere.UpdateCounter);
return AtmosDirection.All;
}
@@ -56,8 +61,8 @@ namespace Content.Server.Atmos.EntitySystems
return false;
if (tile.Air == null || tile.Air.Temperature < (starting
? Atmospherics.MinimumTemperatureStartSuperConduction
: Atmospherics.MinimumTemperatureForSuperconduction))
? Atmospherics.MinimumTemperatureStartSuperConduction
: Atmospherics.MinimumTemperatureForSuperconduction))
return false;
return !(GetHeatCapacity(tile.Air) < Atmospherics.MCellWithRatio)
@@ -123,7 +128,7 @@ namespace Content.Server.Atmos.EntitySystems
private void TemperatureShareMutualSolid(TileAtmosphere tile, TileAtmosphere other, float conductionCoefficient)
{
var deltaTemperature = (tile.Temperature - other.Temperature);
var deltaTemperature = (tile.TemperatureArchived - other.TemperatureArchived);
if (MathF.Abs(deltaTemperature) > Atmospherics.MinimumTemperatureDeltaToConsider
&& tile.HeatCapacity != 0f && other.HeatCapacity != 0f)
{
@@ -141,7 +146,7 @@ namespace Content.Server.Atmos.EntitySystems
if (tile.Temperature > Atmospherics.T0C)
{
// Hardcoded space temperature.
var deltaTemperature = (tile.Temperature - Atmospherics.TCMB);
var deltaTemperature = (tile.TemperatureArchived - Atmospherics.TCMB);
if ((tile.HeatCapacity > 0) && (MathF.Abs(deltaTemperature) > Atmospherics.MinimumTemperatureDeltaToConsider))
{
var heat = tile.ThermalConductivity * deltaTemperature * (tile.HeatCapacity *