]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Changed door remote to trigger based on vision occlusion(#25093)
authorPlykiya <58439124+Plykiya@users.noreply.github.com>
Sat, 10 Feb 2024 10:22:19 +0000 (02:22 -0800)
committerGitHub <noreply@github.com>
Sat, 10 Feb 2024 10:22:19 +0000 (02:22 -0800)
Changed door remote to trigger based on vision occlusion rather than opaque collision targeting check. Ian's butt will no longer absorb your 5G signals.

Co-authored-by: Plykiya <plykiya@protonmail.com>
Content.Server/Remotes/DoorRemoteSystem.cs

index c63b2295c162bd66ad0170058ec5b72ced5302ee..a88508ce53d5994ca8d6d74a38f357748acd9edb 100644 (file)
@@ -10,6 +10,7 @@ using Content.Server.Doors.Systems;
 using Content.Server.Power.EntitySystems;
 using Content.Shared.Database;
 using Content.Shared.Interaction.Events;
+using Content.Shared.Examine;
 using static Content.Server.Remotes.DoorRemoteComponent;
 
 namespace Content.Server.Remotes
@@ -65,10 +66,9 @@ namespace Content.Server.Remotes
             if (args.Handled
                 || args.Target == null
                 || !TryComp<DoorComponent>(args.Target, out var doorComp) // If it isn't a door we don't use it
-                // The remote can be used anywhere the user can see the door.
-                // This doesn't work that well, but I don't know of an alternative
-                || !_interactionSystem.InRangeUnobstructed(args.User, args.Target.Value,
-                    SharedInteractionSystem.MaxRaycastRange, CollisionGroup.Opaque))
+                // Only able to control doors if they are within your vision and within your max range.
+                // Not affected by mobs or machines anymore.
+                || !ExamineSystemShared.InRangeUnOccluded(args.User, args.Target.Value, SharedInteractionSystem.MaxRaycastRange, null))
             {
                 return;
             }