From 898e2782665c13443f644723a70a30bf65e34b1f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Aguilera=20Puerto?= Date: Sat, 15 Aug 2020 16:20:31 +0200 Subject: [PATCH] Fix some atmos tiles not being added correctly. --- .../GameObjects/Components/Atmos/GridAtmosphereComponent.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Content.Server/GameObjects/Components/Atmos/GridAtmosphereComponent.cs b/Content.Server/GameObjects/Components/Atmos/GridAtmosphereComponent.cs index c7207ffa4e..cb938944b4 100644 --- a/Content.Server/GameObjects/Components/Atmos/GridAtmosphereComponent.cs +++ b/Content.Server/GameObjects/Components/Atmos/GridAtmosphereComponent.cs @@ -154,13 +154,14 @@ namespace Content.Server.GameObjects.Components.Atmos if (tile == null) { tile = new TileAtmosphere(this, _grid.Index, indices, new GasMixture(GetVolumeForCells(1)){Temperature = Atmospherics.T20C}); - _tiles.Add(indices, tile); + _tiles[indices] = tile; } if (IsSpace(indices)) { tile.Air = new GasMixture(GetVolumeForCells(1)); tile.Air.MarkImmutable(); + _tiles[indices] = tile; } else if (IsAirBlocked(indices)) { @@ -176,6 +177,7 @@ namespace Content.Server.GameObjects.Components.Atmos { var adjacent = GetAdjacentTiles(indices); tile.Air = new GasMixture(GetVolumeForCells(1)){Temperature = Atmospherics.T20C}; + _tiles[indices] = tile; var ratio = 1f / adjacent.Count;