Fix firelocks

This commit is contained in:
Víctor Aguilera Puerto
2020-09-06 17:34:45 +02:00
parent d58b7f0ebe
commit bc972156bb
3 changed files with 15 additions and 2 deletions

View File

@@ -1158,10 +1158,16 @@ namespace Content.Server.Atmos
}
public void UpdateAdjacent(AtmosDirection direction)
{
if (!_gridAtmosphereComponent.IsAirBlocked(GridIndices.Offset(direction.ToDirection())))
{
_adjacentTiles[direction.ToIndex()] = _gridAtmosphereComponent.GetTile(GridIndices.Offset(direction.ToDirection()));
if (!_gridAtmosphereComponent.IsAirBlocked(GridIndices.Offset(direction.ToDirection()), direction.GetOpposite()))
{
_adjacentBits |= direction;
}
else
{
_adjacentBits &= ~direction;
}
}

View File

@@ -87,6 +87,11 @@ namespace Content.Shared.Atmos
{
return direction | other;
}
public static AtmosDirection WithoutFlag(this AtmosDirection direction, AtmosDirection other)
{
return direction & ~other;
}
}
public sealed class AtmosDirectionFlags { }

View File

@@ -15,6 +15,8 @@
- state: closed_unlit
shader: unshaded
map: ["enum.DoorVisualLayers.BaseUnlit"]
- state: welded
map: ["enum.DoorVisualLayers.BaseWelded"]
- state: bolted
shader: unshaded
map: ["enum.DoorVisualLayers.BaseBolted"]