Resolve 'TransformComponent.MapPosition' is obsolete in content (#27939)
* Resolve `'TransformComponent.MapPosition' is obsolete: 'Use TransformSystem.GetMapCoordinates'` in content * build?
This commit is contained in:
@@ -3,6 +3,7 @@ using Content.Server.Beam.Components;
|
||||
using Content.Shared.Beam;
|
||||
using Content.Shared.Beam.Components;
|
||||
using Content.Shared.Physics;
|
||||
using Robust.Server.GameObjects;
|
||||
using Robust.Shared.Audio;
|
||||
using Robust.Shared.Audio.Systems;
|
||||
using Robust.Shared.Map;
|
||||
@@ -16,6 +17,7 @@ namespace Content.Server.Beam;
|
||||
public sealed class BeamSystem : SharedBeamSystem
|
||||
{
|
||||
[Dependency] private readonly FixtureSystem _fixture = default!;
|
||||
[Dependency] private readonly TransformSystem _transform = default!;
|
||||
[Dependency] private readonly SharedAudioSystem _audio = default!;
|
||||
[Dependency] private readonly SharedBroadphaseSystem _broadphase = default!;
|
||||
[Dependency] private readonly SharedPhysicsSystem _physics = default!;
|
||||
@@ -144,8 +146,8 @@ public sealed class BeamSystem : SharedBeamSystem
|
||||
if (Deleted(user) || Deleted(target))
|
||||
return;
|
||||
|
||||
var userMapPos = Transform(user).MapPosition;
|
||||
var targetMapPos = Transform(target).MapPosition;
|
||||
var userMapPos = _transform.GetMapCoordinates(user);
|
||||
var targetMapPos = _transform.GetMapCoordinates(target);
|
||||
|
||||
//The distance between the target and the user.
|
||||
var calculatedDistance = targetMapPos.Position - userMapPos.Position;
|
||||
|
||||
Reference in New Issue
Block a user