Remove most usages of obsolete TransformComponent methods (#19571)

This commit is contained in:
Visne
2023-08-30 04:05:19 +02:00
committed by GitHub
parent 3ba60835ec
commit 1416942bea
91 changed files with 312 additions and 221 deletions

View File

@@ -20,6 +20,7 @@ namespace Content.Client.Pinpointer.UI;
public sealed class NavMapControl : MapGridControl
{
[Dependency] private readonly IEntityManager _entManager = default!;
private readonly SharedTransformSystem _transform;
public EntityUid? MapUid;
@@ -52,6 +53,9 @@ public sealed class NavMapControl : MapGridControl
public NavMapControl() : base(8f, 128f, 48f)
{
IoCManager.InjectDependencies(this);
_transform = _entManager.System<SharedTransformSystem>();
RectClipContent = true;
HorizontalExpand = true;
VerticalExpand = true;
@@ -326,7 +330,7 @@ public sealed class NavMapControl : MapGridControl
if (mapPos.MapId != MapId.Nullspace)
{
var position = xform.InvWorldMatrix.Transform(mapPos.Position) - offset;
var position = _transform.GetInvWorldMatrix(xform).Transform(mapPos.Position) - offset;
position = Scale(new Vector2(position.X, -position.Y));
handle.DrawCircle(position, MinimapScale / 2f, value.Color);