ActionBlocker CanInteract uses EntityUid exclusively

ActionBlockerSystem fully uses EntityUid now!
This commit is contained in:
Vera Aguilera Puerto
2021-11-09 14:54:00 +01:00
parent b6337ffe7a
commit 48f8dd2284
44 changed files with 66 additions and 75 deletions

View File

@@ -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;

View File

@@ -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;

View File

@@ -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;

View File

@@ -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;