minor SharedInteractionSystem cleanup (#30139)

cleanup SharedInteractionSystem
This commit is contained in:
slarticodefast
2024-07-18 02:41:15 +02:00
committed by GitHub
parent 95b56ad4ce
commit 3f014e84eb

View File

@@ -38,8 +38,6 @@ using Robust.Shared.Serialization;
using Robust.Shared.Timing; using Robust.Shared.Timing;
using Robust.Shared.Utility; using Robust.Shared.Utility;
#pragma warning disable 618
namespace Content.Shared.Interaction namespace Content.Shared.Interaction
{ {
/// <summary> /// <summary>
@@ -522,11 +520,11 @@ namespace Content.Shared.Interaction
protected bool ValidateInteractAndFace(EntityUid user, EntityCoordinates coordinates) protected bool ValidateInteractAndFace(EntityUid user, EntityCoordinates coordinates)
{ {
// Verify user is on the same map as the entity they clicked on // Verify user is on the same map as the entity they clicked on
if (coordinates.GetMapId(EntityManager) != Transform(user).MapID) if (_transform.GetMapId(coordinates) != Transform(user).MapID)
return false; return false;
if (!HasComp<NoRotateOnInteractComponent>(user)) if (!HasComp<NoRotateOnInteractComponent>(user))
_rotateToFaceSystem.TryFaceCoordinates(user, coordinates.ToMapPos(EntityManager, _transform)); _rotateToFaceSystem.TryFaceCoordinates(user, _transform.ToMapCoordinates(coordinates).Position);
return true; return true;
} }
@@ -859,7 +857,7 @@ namespace Content.Shared.Interaction
Ignored? predicate = null, Ignored? predicate = null,
bool popup = false) bool popup = false)
{ {
return InRangeUnobstructed(origin, other.ToMap(EntityManager, _transform), range, collisionMask, predicate, popup); return InRangeUnobstructed(origin, _transform.ToMapCoordinates(other), range, collisionMask, predicate, popup);
} }
/// <summary> /// <summary>