Removes AtmosCooldown from TileAtmosphere, fixes various atmos issues (#2297)

* Remove AtmosCooldown

* Fix former space tiles always having an immutable gas mixture

* _tile -> _tiles
This commit is contained in:
Víctor Aguilera Puerto
2020-10-19 14:50:16 +02:00
committed by GitHub
parent 717a375abb
commit 19d32eb4ce
7 changed files with 39 additions and 37 deletions

View File

@@ -241,6 +241,12 @@ namespace Content.Server.GameObjects.Components.Atmos
FixVacuum(tile.GridIndices);
}
// Tile used to be space, but isn't anymore.
if (tile.Air?.Immutable ?? false)
{
tile.Air = null;
}
tile.Air ??= new GasMixture(GetVolumeForCells(1), AtmosphereSystem){Temperature = Atmospherics.T20C};
}
@@ -300,12 +306,15 @@ namespace Content.Server.GameObjects.Components.Atmos
/// <inheritdoc />
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public virtual void RemoveActiveTile(TileAtmosphere? tile)
public virtual void RemoveActiveTile(TileAtmosphere? tile, bool disposeGroup = true)
{
if (tile == null) return;
_activeTiles.Remove(tile);
tile.Excited = false;
tile.ExcitedGroup?.Dispose();
if(disposeGroup)
tile.ExcitedGroup?.Dispose();
else
tile.ExcitedGroup?.RemoveTile(tile);
}
/// <inheritdoc />