Fixes ghosts being able to use uplinks (#5085)

Co-authored-by: ike709 <ike709@github.com>
This commit is contained in:
ike709
2021-10-29 11:37:34 -05:00
committed by GitHub
parent 5c5534de9a
commit d9d101fae8

View File

@@ -18,6 +18,7 @@ using Robust.Shared.Log;
using Robust.Shared.Player; using Robust.Shared.Player;
using System; using System;
using System.Linq; using System.Linq;
using Content.Shared.ActionBlocker;
namespace Content.Server.Traitor.Uplink namespace Content.Server.Traitor.Uplink
{ {
@@ -88,6 +89,10 @@ namespace Content.Server.Traitor.Uplink
if (!EntityManager.TryGetComponent(args.User.Uid, out ActorComponent? actor)) if (!EntityManager.TryGetComponent(args.User.Uid, out ActorComponent? actor))
return; return;
var actionBlocker = EntitySystem.Get<ActionBlockerSystem>();
if (!actionBlocker.CanInteract(uid) || !actionBlocker.CanUse(uid))
return;
ToggleUplinkUI(component, actor.PlayerSession); ToggleUplinkUI(component, actor.PlayerSession);
args.Handled = true; args.Handled = true;
} }