Adds atmos helpers, welding tool now lights up fires

This commit is contained in:
Víctor Aguilera Puerto
2020-08-11 22:34:37 +02:00
parent 6fe95d635d
commit 32e4c24342
2 changed files with 32 additions and 0 deletions

View File

@@ -0,0 +1,25 @@
using Content.Server.GameObjects.EntitySystems;
using Robust.Shared.GameObjects.Systems;
using Robust.Shared.Map;
#nullable enable
namespace Content.Server.Atmos
{
public static class AtmosHelpers
{
public static TileAtmosphere? GetTileAtmosphere(this GridCoordinates coordinates)
{
var gridAtmos = EntitySystem.Get<AtmosphereSystem>().GetGridAtmosphere(coordinates.GridID);
return gridAtmos?.GetTile(coordinates);
}
public static TileAtmosphere? GetTileAtmosphere(this MapIndices indices, GridId gridId)
{
var gridAtmos = EntitySystem.Get<AtmosphereSystem>().GetGridAtmosphere(gridId);
return gridAtmos?.GetTile(indices);
}
}
}