]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
minor SharedInteractionSystem cleanup (#30139)
authorslarticodefast <161409025+slarticodefast@users.noreply.github.com>
Thu, 18 Jul 2024 00:41:15 +0000 (02:41 +0200)
committerGitHub <noreply@github.com>
Thu, 18 Jul 2024 00:41:15 +0000 (10:41 +1000)
cleanup SharedInteractionSystem

Content.Shared/Interaction/SharedInteractionSystem.cs

index 48076ca360fffdb5d70f312287a31c92909925ea..c32b4bcf78092473928ecf0d7efe50d5841c35ca 100644 (file)
@@ -38,8 +38,6 @@ using Robust.Shared.Serialization;
 using Robust.Shared.Timing;
 using Robust.Shared.Utility;
 
-#pragma warning disable 618
-
 namespace Content.Shared.Interaction
 {
     /// <summary>
@@ -522,11 +520,11 @@ namespace Content.Shared.Interaction
         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;
         }
@@ -859,7 +857,7 @@ namespace Content.Shared.Interaction
             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>
@@ -966,7 +964,7 @@ namespace Content.Shared.Interaction
         /// </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);