ActionBlocker CanInteract uses EntityUid exclusively
ActionBlockerSystem fully uses EntityUid now!
This commit is contained in:
@@ -112,7 +112,7 @@ namespace Content.Server.Disposal.Tube.Components
|
||||
var actionBlocker = EntitySystem.Get<ActionBlockerSystem>();
|
||||
var groupController = IoCManager.Resolve<IConGroupController>();
|
||||
//Check if player can interact in their current state
|
||||
if (!groupController.CanAdminMenu(session) && (!actionBlocker.CanInteract(session.AttachedEntity) || !actionBlocker.CanUse(session.AttachedEntityUid!.Value)))
|
||||
if (!groupController.CanAdminMenu(session) && (!actionBlocker.CanInteract(session.AttachedEntityUid!.Value) || !actionBlocker.CanUse(session.AttachedEntityUid!.Value)))
|
||||
return false;
|
||||
|
||||
return true;
|
||||
|
||||
@@ -94,7 +94,7 @@ namespace Content.Server.Disposal.Tube.Components
|
||||
var actionBlocker = EntitySystem.Get<ActionBlockerSystem>();
|
||||
var groupController = IoCManager.Resolve<IConGroupController>();
|
||||
//Check if player can interact in their current state
|
||||
if (!groupController.CanAdminMenu(session) && (!actionBlocker.CanInteract(session.AttachedEntity) || !actionBlocker.CanUse(session.AttachedEntityUid!.Value)))
|
||||
if (!groupController.CanAdminMenu(session) && (!actionBlocker.CanInteract(session.AttachedEntityUid!.Value) || !actionBlocker.CanUse(session.AttachedEntityUid!.Value)))
|
||||
return false;
|
||||
|
||||
return true;
|
||||
|
||||
@@ -96,7 +96,7 @@ namespace Content.Server.Disposal.Unit.Components
|
||||
|
||||
var actionBlocker = EntitySystem.Get<ActionBlockerSystem>();
|
||||
|
||||
if (!actionBlocker.CanInteract(player) ||
|
||||
if (!actionBlocker.CanInteract(player.Uid) ||
|
||||
!actionBlocker.CanUse(player.Uid))
|
||||
{
|
||||
return false;
|
||||
|
||||
@@ -379,7 +379,7 @@ namespace Content.Server.Disposal.Unit.EntitySystems
|
||||
|
||||
private bool IsValidInteraction(ITargetedInteractEventArgs eventArgs)
|
||||
{
|
||||
if (!Get<ActionBlockerSystem>().CanInteract(eventArgs.User))
|
||||
if (!Get<ActionBlockerSystem>().CanInteract(eventArgs.User.Uid))
|
||||
{
|
||||
eventArgs.Target.PopupMessage(eventArgs.User, Loc.GetString("ui-disposal-unit-is-valid-interaction-cannot=interact"));
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user