Resolve 'TransformComponent.MapPosition' is obsolete in content (#27939)
* Resolve `'TransformComponent.MapPosition' is obsolete: 'Use TransformSystem.GetMapCoordinates'` in content * build?
This commit is contained in:
@@ -4,6 +4,7 @@ using Content.Server.Radio;
|
||||
using Content.Server.SurveillanceCamera;
|
||||
using Content.Shared.Emp;
|
||||
using Content.Shared.Examine;
|
||||
using Robust.Server.GameObjects;
|
||||
using Robust.Shared.Map;
|
||||
|
||||
namespace Content.Server.Emp;
|
||||
@@ -11,6 +12,7 @@ namespace Content.Server.Emp;
|
||||
public sealed class EmpSystem : SharedEmpSystem
|
||||
{
|
||||
[Dependency] private readonly EntityLookupSystem _lookup = default!;
|
||||
[Dependency] private readonly TransformSystem _transform = default!;
|
||||
|
||||
public const string EmpPulseEffectPrototype = "EffectEmpPulse";
|
||||
|
||||
@@ -102,7 +104,7 @@ public sealed class EmpSystem : SharedEmpSystem
|
||||
|
||||
private void HandleEmpTrigger(EntityUid uid, EmpOnTriggerComponent comp, TriggerEvent args)
|
||||
{
|
||||
EmpPulse(Transform(uid).MapPosition, comp.Range, comp.EnergyConsumption, comp.DisableDuration);
|
||||
EmpPulse(_transform.GetMapCoordinates(uid), comp.Range, comp.EnergyConsumption, comp.DisableDuration);
|
||||
args.Handled = true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user