Partial atmos refactor (#22521)
* Reduce atmos component queries * Remove method events * Cache airtight data * Make MolesArchived nullable * Fix airtight cache * only get tile def once * Immutable mixtures * firelock queries * misc * misc cleanup * Trim disconnected tiles * Fix merge issues and bugs * Why does the PR keep increasing in scope * debug overlay * Fix bugs * Fix test, remove unused events * Add setmapatmos command * Fix overlays * Add map check * A * Resolve conflicts with #26102 * Remove some obsolete methods
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
using Content.Server.Atmos.Components;
|
||||
using Content.Shared.Atmos;
|
||||
using Robust.Shared.Map.Components;
|
||||
|
||||
namespace Content.Server.Atmos.EntitySystems
|
||||
{
|
||||
@@ -12,7 +13,8 @@ namespace Content.Server.Atmos.EntitySystems
|
||||
for(var i = 0; i < Atmospherics.Directions; i++)
|
||||
{
|
||||
var direction = (AtmosDirection) (1 << i);
|
||||
if (!directions.IsFlagSet(direction)) continue;
|
||||
if (!directions.IsFlagSet(direction))
|
||||
continue;
|
||||
|
||||
var adjacent = tile.AdjacentTiles[direction.ToIndex()];
|
||||
|
||||
@@ -92,7 +94,9 @@ namespace Content.Server.Atmos.EntitySystems
|
||||
{
|
||||
if (tile.Air == null)
|
||||
{
|
||||
if (other.Tile != null)
|
||||
// TODO ATMOS: why does this need to check if a tile exists if it doesn't use the tile?
|
||||
if (TryComp<MapGridComponent>(other.GridIndex, out var grid)
|
||||
&& _mapSystem.TryGetTileRef(other.GridIndex, grid, other.GridIndices, out var _))
|
||||
{
|
||||
TemperatureShareOpenToSolid(other, tile);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user