From d9d101fae8f8824820d9b838493e691db4b3170b Mon Sep 17 00:00:00 2001 From: ike709 Date: Fri, 29 Oct 2021 11:37:34 -0500 Subject: [PATCH] Fixes ghosts being able to use uplinks (#5085) Co-authored-by: ike709 --- Content.Server/Traitor/Uplink/UplinkSystem.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Content.Server/Traitor/Uplink/UplinkSystem.cs b/Content.Server/Traitor/Uplink/UplinkSystem.cs index 674fa67dff..7aec424448 100644 --- a/Content.Server/Traitor/Uplink/UplinkSystem.cs +++ b/Content.Server/Traitor/Uplink/UplinkSystem.cs @@ -18,6 +18,7 @@ using Robust.Shared.Log; using Robust.Shared.Player; using System; using System.Linq; +using Content.Shared.ActionBlocker; namespace Content.Server.Traitor.Uplink { @@ -88,6 +89,10 @@ namespace Content.Server.Traitor.Uplink if (!EntityManager.TryGetComponent(args.User.Uid, out ActorComponent? actor)) return; + var actionBlocker = EntitySystem.Get(); + if (!actionBlocker.CanInteract(uid) || !actionBlocker.CanUse(uid)) + return; + ToggleUplinkUI(component, actor.PlayerSession); args.Handled = true; } @@ -100,7 +105,7 @@ namespace Content.Server.Traitor.Uplink { UpdateUserInterface(uplink); } - } + } } private void OnRequestUpdateUI(EntityUid uid, UplinkComponent uplink, UplinkRequestUpdateInterfaceMessage args)