Resolve 'TransformComponent.MapPosition' is obsolete in content (#27939)

* Resolve `'TransformComponent.MapPosition' is obsolete: 'Use TransformSystem.GetMapCoordinates'` in content

* build?
This commit is contained in:
Kara
2024-05-12 07:31:54 -07:00
committed by GitHub
parent 8938e1d8b2
commit 855234aa30
59 changed files with 152 additions and 84 deletions

View File

@@ -13,6 +13,7 @@ using Content.Shared.Fluids.Components;
using Content.Shared.Interaction;
using Content.Shared.Tag;
using Content.Shared.Verbs;
using Robust.Server.GameObjects;
using Robust.Shared.Audio.Systems;
using Robust.Shared.Collections;
using Robust.Shared.Prototypes;
@@ -31,6 +32,7 @@ public sealed class DrainSystem : SharedDrainSystem
[Dependency] private readonly TagSystem _tagSystem = default!;
[Dependency] private readonly DoAfterSystem _doAfterSystem = default!;
[Dependency] private readonly PuddleSystem _puddleSystem = default!;
[Dependency] private readonly TransformSystem _transform = default!;
[Dependency] private readonly IRobustRandom _random = default!;
[Dependency] private readonly IPrototypeManager _prototypeManager = default!;
@@ -161,7 +163,7 @@ public sealed class DrainSystem : SharedDrainSystem
puddles.Clear();
foreach (var entity in _lookup.GetEntitiesInRange(xform.MapPosition, drain.Range))
foreach (var entity in _lookup.GetEntitiesInRange(_transform.GetMapCoordinates(uid, xform), drain.Range))
{
// No InRangeUnobstructed because there's no collision group that fits right now
// and these are placed by mappers and not buildable/movable so shouldnt really be a problem...