using Content.Server.Anomaly.Components;
-using Content.Server.Power.Components;
using Content.Server.Power.EntitySystems;
using Content.Server.Station.Components;
using Content.Shared.Anomaly;
using Robust.Shared.Map.Components;
using Robust.Shared.Physics;
using Robust.Shared.Physics.Components;
-using Robust.Shared.Map;
-using System.Numerics;
using Content.Shared.Power;
-using Robust.Server.GameObjects;
namespace Content.Server.Anomaly;
var valid = true;
// TODO: This should be using static lookup.
- foreach (var ent in gridComp.GetAnchoredEntities(tile))
+ foreach (var ent in _mapSystem.GetAnchoredEntities(grid, gridComp, tile))
{
if (!physQuery.TryGetComponent(ent, out var body))
continue;
continue;
var pos = _mapSystem.GridTileToLocal(grid, gridComp, tile);
- var mapPos = pos.ToMap(EntityManager, _transform);
+ var mapPos = _transform.ToMapCoordinates(pos);
// don't spawn in AntiAnomalyZones
var antiAnomalyZonesQueue = AllEntityQuery<AntiAnomalyZoneComponent, TransformComponent>();
- while (antiAnomalyZonesQueue.MoveNext(out var uid, out var zone, out var antiXform))
+ while (antiAnomalyZonesQueue.MoveNext(out _, out var zone, out var antiXform))
{
if (antiXform.MapID != mapPos.MapId)
continue;