CVars for atmos (#2633)

* Monstermos is a word!

* Atmos CVars

* Cache CVars in AtmosphereSystem.

Co-authored-by: Pieter-Jan Briers <pieterjan.briers+git@gmail.com>
This commit is contained in:
Víctor Aguilera Puerto
2020-11-27 16:49:12 +01:00
committed by GitHub
parent 8177be3061
commit 6bb1e9fa5d
6 changed files with 136 additions and 57 deletions

View File

@@ -636,7 +636,7 @@ namespace Content.Server.Atmos
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public void ProcessCell(int fireCount)
public void ProcessCell(int fireCount, bool spaceWind = true)
{
// Can't process a tile without air
if (Air == null)
@@ -708,14 +708,16 @@ namespace Content.Server.Atmos
{
var difference = Air.Share(enemyTile.Air, adjacentTileLength);
// Space wind!
if (difference > 0)
if (spaceWind)
{
ConsiderPressureDifference(enemyTile, difference);
}
else
{
enemyTile.ConsiderPressureDifference(this, -difference);
if (difference > 0)
{
ConsiderPressureDifference(enemyTile, difference);
}
else
{
enemyTile.ConsiderPressureDifference(this, -difference);
}
}
LastShareCheck();