Fix NoAirWhenFullyAirBlocked (#12709)

This commit is contained in:
Leon Friedrich
2022-11-24 14:45:08 +13:00
committed by GitHub
parent 32ba8e4f9d
commit 186b8e00da
3 changed files with 13 additions and 16 deletions

View File

@@ -83,22 +83,10 @@ namespace Content.Server.Atmos.EntitySystems
tile.Air = GetTileMixture(null, mapUid, indices);
tile.MolesArchived = tile.Air != null ? new float[Atmospherics.AdjustedNumberOfGases] : null;
tile.Space = IsTileSpace(null, mapUid, indices, mapGridComp);
} else if (isAirBlocked)
}
else if (isAirBlocked)
{
var nullAir = false;
var enumerator = GetObstructingComponentsEnumerator(mapGridComp, indices);
while (enumerator.MoveNext(out var airtight))
{
if (!airtight.NoAirWhenFullyAirBlocked)
continue;
nullAir = true;
break;
}
if (nullAir)
if (airBlockedEv.NoAir)
{
tile.Air = null;
tile.MolesArchived = null;