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

@@ -665,14 +665,14 @@ namespace Content.Shared.Interaction
else
{
// We'll still do the raycast from the centres but we'll bump the range as we know they're in range.
originPos = xformA.MapPosition;
originPos = _transform.GetMapCoordinates(origin, xform: xformA);
range = (originPos.Position - targetPos.Position).Length();
}
}
// No fixtures, e.g. wallmounts.
else
{
originPos = Transform(origin).MapPosition;
originPos = _transform.GetMapCoordinates(origin);
var otherParent = Transform(other).ParentUid;
targetRot = otherParent.IsValid() ? Transform(otherParent).LocalRotation + otherAngle : otherAngle;
}
@@ -826,7 +826,7 @@ namespace Content.Shared.Interaction
bool popup = false)
{
Ignored combinedPredicate = e => e == origin || (predicate?.Invoke(e) ?? false);
var originPosition = Transform(origin).MapPosition;
var originPosition = _transform.GetMapCoordinates(origin);
var inRange = InRangeUnobstructed(originPosition, other, range, collisionMask, combinedPredicate, ShouldCheckAccess(origin));
if (!inRange && popup && _gameTiming.IsFirstTimePredicted)