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:
committed by
GitHub
parent
9db2fbefe1
commit
94fa6efefb
@@ -18,11 +18,6 @@ namespace Content.Server.Atmos.EntitySystems
|
||||
{
|
||||
[Dependency] private readonly IRobustRandom _robustRandom = default!;
|
||||
|
||||
/// <summary>
|
||||
/// Threshold for logging explosive depressurization.
|
||||
/// </summary>
|
||||
private const float DepressurizationLogThreshold = Atmospherics.MolesCellStandard * 10;
|
||||
|
||||
private readonly TileAtmosphereComparer _monstermosComparer = new();
|
||||
|
||||
private readonly TileAtmosphere?[] _equalizeTiles = new TileAtmosphere[Atmospherics.MonstermosHardTileLimit];
|
||||
@@ -92,7 +87,7 @@ namespace Content.Server.Atmos.EntitySystems
|
||||
if(tileCount < Atmospherics.MonstermosHardTileLimit)
|
||||
_equalizeTiles[tileCount++] = adj;
|
||||
|
||||
if (adj.Air.Immutable)
|
||||
if (adj.Air.Immutable && MonstermosDepressurization)
|
||||
{
|
||||
// Looks like someone opened an airlock to space!
|
||||
|
||||
@@ -466,7 +461,14 @@ namespace Content.Server.Atmos.EntitySystems
|
||||
otherTile2.PressureDirection = otherTile.MonstermosInfo.CurrentTransferDirection;
|
||||
}
|
||||
|
||||
otherTile.Air?.Clear();
|
||||
|
||||
// This gas mixture cannot be null, no tile in _depressurizeProgressionOrder can have a null gas mixture
|
||||
otherTile.Air!.Clear();
|
||||
|
||||
// This is a little hacky, but hear me out. It makes sense. We have just vacuumed all of the tile's air
|
||||
// therefore there is no more gas in the tile, therefore the tile should be as cold as space!
|
||||
otherTile.Air.Temperature = Atmospherics.TCMB;
|
||||
|
||||
InvalidateVisuals(otherTile.GridIndex, otherTile.GridIndices);
|
||||
HandleDecompressionFloorRip(mapGrid, otherTile, sum);
|
||||
}
|
||||
@@ -482,7 +484,7 @@ namespace Content.Server.Atmos.EntitySystems
|
||||
gridPhysics.ApplyAngularImpulse(Vector2.Cross(tile.GridIndices - gridPhysics.LocalCenter, direction) * totalMolesRemoved);
|
||||
}
|
||||
|
||||
if(totalMolesRemoved > DepressurizationLogThreshold)
|
||||
if(tileCount > 10 && (totalMolesRemoved / tileCount) > 20)
|
||||
_adminLog.Add(LogType.ExplosiveDepressurization, LogImpact.High,
|
||||
$"Explosive depressurization removed {totalMolesRemoved} moles from {tileCount} tiles starting from position {tile.GridIndices:position} on grid ID {tile.GridIndex:grid}");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user