From f52984553bf0d59856f006bc118b0826d7e457e0 Mon Sep 17 00:00:00 2001 From: Vera Aguilera Puerto Date: Sun, 20 Dec 2020 23:04:48 +0100 Subject: [PATCH] Fix airblocked space tiles venting air Fixes part of #2780 --- .../GameObjects/Components/Atmos/GridAtmosphereComponent.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Content.Server/GameObjects/Components/Atmos/GridAtmosphereComponent.cs b/Content.Server/GameObjects/Components/Atmos/GridAtmosphereComponent.cs index 12ee989ebd..193b606eb0 100644 --- a/Content.Server/GameObjects/Components/Atmos/GridAtmosphereComponent.cs +++ b/Content.Server/GameObjects/Components/Atmos/GridAtmosphereComponent.cs @@ -218,13 +218,15 @@ namespace Content.Server.GameObjects.Components.Atmos Tiles[indices] = tile; } - if (IsSpace(indices)) + var isAirBlocked = IsAirBlocked(indices); + + if (IsSpace(indices) && !isAirBlocked) { tile.Air = new GasMixture(GetVolumeForCells(1), AtmosphereSystem); tile.Air.MarkImmutable(); Tiles[indices] = tile; - } else if (IsAirBlocked(indices)) + } else if (isAirBlocked) { tile.Air = null; }