public sealed class SmokeOnTriggerSystem : SharedSmokeOnTriggerSystem
{
[Dependency] private readonly IMapManager _mapMan = default!;
+ [Dependency] private readonly SharedMapSystem _map = default!;
[Dependency] private readonly SmokeSystem _smoke = default!;
[Dependency] private readonly TransformSystem _transform = default!;
[Dependency] private readonly SpreaderSystem _spreader = default!;
{
var xform = Transform(uid);
var mapCoords = _transform.GetMapCoordinates(uid, xform);
- if (!_mapMan.TryFindGridAt(mapCoords, out _, out var grid) ||
- !grid.TryGetTileRef(xform.Coordinates, out var tileRef) ||
+ if (!_mapMan.TryFindGridAt(mapCoords, out var gridUid, out var grid) ||
+ !_map.TryGetTileRef(gridUid, grid, xform.Coordinates, out var tileRef) ||
tileRef.Tile.IsEmpty)
{
return;
if (_spreader.RequiresFloorToSpread(comp.SmokePrototype.ToString()) && tileRef.Tile.IsSpace())
return;
- var coords = grid.MapToGrid(mapCoords);
+ var coords = _map.MapToGrid(gridUid, mapCoords);
var ent = Spawn(comp.SmokePrototype, coords.SnapToGrid());
if (!TryComp<SmokeComponent>(ent, out var smoke))
{