Support for non-fulltile firelocks!
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using System.Collections.Generic;
|
||||
using Content.Server.GameObjects.Components.Atmos;
|
||||
using Content.Server.GameObjects.Components.Atmos.Piping;
|
||||
using Content.Server.GameObjects.Components.NodeContainer.NodeGroups;
|
||||
using Content.Shared.Atmos;
|
||||
@@ -48,7 +49,7 @@ namespace Content.Server.Atmos
|
||||
/// Revalidates indices immediately.
|
||||
/// </summary>
|
||||
/// <param name="indices"></param>
|
||||
void Revalidate(MapIndices indices);
|
||||
void UpdateAdjacentBits(MapIndices indices);
|
||||
|
||||
/// <summary>
|
||||
/// Adds an active tile so it becomes processed every update until it becomes inactive.
|
||||
@@ -117,6 +118,7 @@ namespace Content.Server.Atmos
|
||||
/// Returns a tile.
|
||||
/// </summary>
|
||||
/// <param name="indices"></param>
|
||||
/// <param name="createSpace"></param>
|
||||
/// <returns></returns>
|
||||
TileAtmosphere GetTile(MapIndices indices, bool createSpace = true);
|
||||
|
||||
@@ -124,17 +126,19 @@ namespace Content.Server.Atmos
|
||||
/// Returns a tile.
|
||||
/// </summary>
|
||||
/// <param name="coordinates"></param>
|
||||
/// <param name="createSpace"></param>
|
||||
/// <returns></returns>
|
||||
TileAtmosphere GetTile(GridCoordinates coordinates, bool createSpace = true);
|
||||
|
||||
/// <summary>
|
||||
/// Returns if the tile in question is air-blocked.
|
||||
/// This could be due to a wall, an airlock, etc.
|
||||
/// Also see AirtightComponent.
|
||||
/// <seealso cref="AirtightComponent"/>
|
||||
/// </summary>
|
||||
/// <param name="indices"></param>
|
||||
/// <param name="direction"></param>
|
||||
/// <returns></returns>
|
||||
bool IsAirBlocked(MapIndices indices);
|
||||
bool IsAirBlocked(MapIndices indices, AtmosDirection direction);
|
||||
|
||||
/// <summary>
|
||||
/// Returns if the tile in question is space.
|
||||
|
||||
@@ -1122,7 +1122,7 @@ namespace Content.Server.Atmos
|
||||
_adjacentTiles[direction.ToIndex()] = adjacent;
|
||||
adjacent?.UpdateAdjacent(direction.GetOpposite());
|
||||
|
||||
if (adjacent != null && !_gridAtmosphereComponent.IsAirBlocked(adjacent.GridIndices))
|
||||
if (adjacent != null && !_gridAtmosphereComponent.IsAirBlocked(adjacent.GridIndices, direction.GetOpposite()))
|
||||
{
|
||||
_adjacentBits |= direction;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user