[Dependency] private readonly SharedContainerSystem _containerSystem = default!;
[Dependency] private readonly AtmosphereSystem _atmosSystem = default!;
[Dependency] private readonly TransformSystem _transform = default!;
+ [Dependency] private readonly SharedMapSystem _map = default!;
+
public override void Initialize()
{
base.Initialize();
return null;
var position = xform.Coordinates;
- foreach (var entity in grid.GetInDir(position, nextDirection))
+ foreach (var entity in _map.GetInDir(xform.GridUid.Value, grid, position, nextDirection))
{
if (!TryComp(entity, out DisposalTubeComponent? tube))
{
[Dependency] private readonly SharedHandsSystem _handsSystem = default!;
[Dependency] private readonly TransformSystem _transformSystem = default!;
[Dependency] private readonly UserInterfaceSystem _ui = default!;
+ [Dependency] private readonly SharedMapSystem _map = default!;
public override void Initialize()
{
var delay = insertingSelf ? unit.EntryDelay : unit.DraggedEntryDelay;
if (userId != null && !insertingSelf)
- _popupSystem.PopupEntity(Loc.GetString("disposal-unit-being-inserted", ("user", Identity.Entity((EntityUid) userId, EntityManager))), toInsertId, toInsertId, PopupType.Large);
+ _popupSystem.PopupEntity(Loc.GetString("disposal-unit-being-inserted", ("user", Identity.Entity((EntityUid)userId, EntityManager))), toInsertId, toInsertId, PopupType.Large);
if (delay <= 0 || userId == null)
{
return false;
var coords = xform.Coordinates;
- var entry = grid.GetLocal(coords)
+ var entry = _map.GetLocal(xform.GridUid.Value, grid, coords)
.FirstOrDefault(HasComp<DisposalEntryComponent>);
if (entry == default || component is not DisposalUnitComponent sDisposals)