Resolve 'TransformComponent.MapPosition' is obsolete in content (#27939)
* Resolve `'TransformComponent.MapPosition' is obsolete: 'Use TransformSystem.GetMapCoordinates'` in content * build?
This commit is contained in:
@@ -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...
|
||||
|
||||
Reference in New Issue
Block a user