From 3c0473dfe4f27a374fa92b905bbb75217920cde6 Mon Sep 17 00:00:00 2001 From: E F R <602406+Efruit@users.noreply.github.com> Date: Sun, 24 Oct 2021 08:21:39 +0000 Subject: [PATCH] Server/MachineLinking: allow linking devices that are inside obstructions (#5010) ...like signal buttons/switches on a wall. --- Content.Server/MachineLinking/System/SignalLinkerSystem.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Content.Server/MachineLinking/System/SignalLinkerSystem.cs b/Content.Server/MachineLinking/System/SignalLinkerSystem.cs index 02d6a04468..7888a17b84 100644 --- a/Content.Server/MachineLinking/System/SignalLinkerSystem.cs +++ b/Content.Server/MachineLinking/System/SignalLinkerSystem.cs @@ -123,7 +123,7 @@ namespace Content.Server.MachineLinking.System !msg.Session.AttachedEntity.TryGetComponent(out HandsComponent? hands) || !hands.TryGetActiveHeldEntity(out var heldEntity) || !heldEntity.TryGetComponent(out SignalLinkerComponent? signalLinkerComponent) || - !_interaction.InRangeUnobstructed(msg.Session.AttachedEntity, component.Owner) || + !_interaction.InRangeUnobstructed(msg.Session.AttachedEntity, component.Owner, ignoreInsideBlocker: true) || !signalLinkerComponent.Port.HasValue || !signalLinkerComponent.Port.Value.transmitter.Outputs.ContainsPort(signalLinkerComponent.Port .Value.port) || !component.Inputs.ContainsPort(portSelected.Port)) @@ -163,7 +163,7 @@ namespace Content.Server.MachineLinking.System !msg.Session.AttachedEntity.TryGetComponent(out HandsComponent? hands) || !hands.TryGetActiveHeldEntity(out var heldEntity) || !heldEntity.TryGetComponent(out SignalLinkerComponent? signalLinkerComponent) || - !_interaction.InRangeUnobstructed(msg.Session.AttachedEntity, component.Owner)) + !_interaction.InRangeUnobstructed(msg.Session.AttachedEntity, component.Owner, ignoreInsideBlocker: true)) return; LinkerSaveInteraction(msg.Session.AttachedEntity, signalLinkerComponent, component, portSelected.Port);