Skip to content

Commit

Permalink
minor SharedInteractionSystem cleanup (#30139)
Browse files Browse the repository at this point in the history
cleanup SharedInteractionSystem
  • Loading branch information
slarticodefast authored Jul 18, 2024
1 parent 95b56ad commit 3f014e8
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions Content.Shared/Interaction/SharedInteractionSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,6 @@
using Robust.Shared.Timing;
using Robust.Shared.Utility;

#pragma warning disable 618

namespace Content.Shared.Interaction
{
/// <summary>
Expand Down Expand Up @@ -522,11 +520,11 @@ public void InteractUsingRanged(EntityUid user, EntityUid used, EntityUid? targe
protected bool ValidateInteractAndFace(EntityUid user, EntityCoordinates coordinates)
{
// 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;

if (!HasComp<NoRotateOnInteractComponent>(user))
_rotateToFaceSystem.TryFaceCoordinates(user, coordinates.ToMapPos(EntityManager, _transform));
_rotateToFaceSystem.TryFaceCoordinates(user, _transform.ToMapCoordinates(coordinates).Position);

return true;
}
Expand Down Expand Up @@ -859,7 +857,7 @@ public bool InRangeUnobstructed(
Ignored? predicate = null,
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>
Expand Down Expand Up @@ -966,7 +964,7 @@ public void InteractUsing(
/// </summary>
public void InteractDoAfter(EntityUid user, EntityUid used, EntityUid? target, EntityCoordinates clickLocation, bool canReach)
{
if (target is {Valid: false})
if (target is { Valid: false })
target = null;

var afterInteractEvent = new AfterInteractEvent(user, used, target, clickLocation, canReach);
Expand Down

0 comments on commit 3f014e8

Please sign in to comment.