Fixes ghosts being able to use uplinks (#5085)
Co-authored-by: ike709 <ike709@github.com>
This commit is contained in:
@@ -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;
|
||||||
}
|
}
|
||||||
@@ -100,7 +105,7 @@ namespace Content.Server.Traitor.Uplink
|
|||||||
{
|
{
|
||||||
UpdateUserInterface(uplink);
|
UpdateUserInterface(uplink);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnRequestUpdateUI(EntityUid uid, UplinkComponent uplink, UplinkRequestUpdateInterfaceMessage args)
|
private void OnRequestUpdateUI(EntityUid uid, UplinkComponent uplink, UplinkRequestUpdateInterfaceMessage args)
|
||||||
|
|||||||
Reference in New Issue
Block a user