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

@@ -415,7 +415,7 @@ namespace Content.Client.DragDrop
/// <returns>null if the target doesn't support IDragDropOn</returns>
private bool? ValidDragDrop(DragDropEvent eventArgs)
{
if (!_actionBlockerSystem.CanInteract(eventArgs.User))
if (!_actionBlockerSystem.CanInteract(eventArgs.User.Uid))
{
return false;
}

View File

@@ -174,7 +174,7 @@ namespace Content.Server.AME.Components
var actionBlocker = EntitySystem.Get<ActionBlockerSystem>();
//Check if player can interact in their current state
if (!actionBlocker.CanInteract(playerEntity) || !actionBlocker.CanUse(playerEntity.Uid))
if (!actionBlocker.CanInteract(playerEntity.Uid) || !actionBlocker.CanUse(playerEntity.Uid))
return false;
//Check if device is powered
if (needsPower && !Powered)

View File

@@ -42,7 +42,7 @@ namespace Content.Server.Actions.Spells
return;
}
if (!EntitySystem.Get<ActionBlockerSystem>().CanInteract(caster)) return;
if (!EntitySystem.Get<ActionBlockerSystem>().CanInteract(caster.Uid)) return;
// TODO: Nix when we get EntityPrototype serializers
if (!IoCManager.Resolve<IPrototypeManager>().HasIndex<EntityPrototype>(ItemProto))

View File

@@ -17,7 +17,7 @@ namespace Content.Server.Alert.Click
{
public void AlertClicked(ClickAlertEventArgs args)
{
if (!EntitySystem.Get<ActionBlockerSystem>().CanInteract(args.Player))
if (!EntitySystem.Get<ActionBlockerSystem>().CanInteract(args.Player.Uid))
return;
if (args.Player.TryGetComponent<SharedPullableComponent>(out var playerPullable))

View File

@@ -52,7 +52,7 @@ namespace Content.Server.Arcade.Components
if(!Powered || !eventArgs.User.TryGetComponent(out ActorComponent? actor))
return;
if(!EntitySystem.Get<ActionBlockerSystem>().CanInteract(eventArgs.User))
if(!EntitySystem.Get<ActionBlockerSystem>().CanInteract(eventArgs.User.Uid))
return;
UserInterface?.Toggle(actor.PlayerSession);
@@ -131,7 +131,7 @@ namespace Content.Server.Arcade.Components
if (obj.Session != _player) break;
// TODO: Should this check if the Owner can interact...?
if (!EntitySystem.Get<ActionBlockerSystem>().CanInteract(Owner))
if (!EntitySystem.Get<ActionBlockerSystem>().CanInteract(OwnerUid))
{
DeactivePlayer(obj.Session);
break;

View File

@@ -77,7 +77,7 @@ namespace Content.Server.Arcade.Components
if (!Powered || !eventArgs.User.TryGetComponent(out ActorComponent? actor))
return;
if (!EntitySystem.Get<ActionBlockerSystem>().CanInteract(eventArgs.User))
if (!EntitySystem.Get<ActionBlockerSystem>().CanInteract(eventArgs.User.Uid))
return;
_game ??= new SpaceVillainGame(this);

View File

@@ -64,7 +64,7 @@ namespace Content.Server.GameObjects.Components
return; // Not powered, so this computer should probably do nothing.
}
// Can we interact?
if (!EntitySystem.Get<ActionBlockerSystem>().CanInteract(sessionEntity))
if (!EntitySystem.Get<ActionBlockerSystem>().CanInteract(sessionEntity.Uid))
{
sessionEntity.PopupMessageCursor(Loc.GetString("base-computer-ui-component-cannot-interact"));
return;

View File

@@ -160,7 +160,7 @@ namespace Content.Server.Atmos.EntitySystems
if (!Resolve(uid, ref flammable, ref alerts))
return;
if (!flammable.OnFire || !_actionBlockerSystem.CanInteract(flammable.Owner) || flammable.Resisting)
if (!flammable.OnFire || !_actionBlockerSystem.CanInteract(flammable.Owner.Uid) || flammable.Resisting)
return;
flammable.Resisting = true;

View File

@@ -48,7 +48,7 @@ namespace Content.Server.Atmos.Piping.Binary.EntitySystems
private void OnActivate(EntityUid uid, GasValveComponent component, ActivateInWorldEvent args)
{
if (args.User.InRangeUnobstructed(args.Target) && Get<ActionBlockerSystem>().CanInteract(args.User))
if (args.User.InRangeUnobstructed(args.Target) && Get<ActionBlockerSystem>().CanInteract(args.User.Uid))
{
Toggle(uid, component);
SoundSystem.Play(Filter.Pvs(component.Owner), component._valveSound.GetSound(), component.Owner, AudioHelpers.WithVariation(0.25f));

View File

@@ -57,7 +57,7 @@ namespace Content.Server.Body.Surgery.Components
continue;
}
if (!_actionBlockerSystem.CanInteract(tool.PerformerCache) ||
if (!_actionBlockerSystem.CanInteract(tool.PerformerCache.Uid) ||
!tool.PerformerCache.InRangeUnobstructed(tool.BodyCache))
{
tool.CloseAllSurgeryUIs();

View File

@@ -15,7 +15,7 @@ namespace Content.Server.Botany.Components
async Task<bool> IInteractUsing.InteractUsing(InteractUsingEventArgs eventArgs)
{
if (!EntitySystem.Get<ActionBlockerSystem>().CanInteract(eventArgs.User))
if (!EntitySystem.Get<ActionBlockerSystem>().CanInteract(eventArgs.User.Uid))
return false;
if (eventArgs.Using.HasTag("BotanySharp"))

View File

@@ -421,7 +421,7 @@ namespace Content.Server.Botany.Components
public bool DoHarvest(IEntity user)
{
if (Seed == null || user.Deleted || !EntitySystem.Get<ActionBlockerSystem>().CanInteract(user))
if (Seed == null || user.Deleted || !EntitySystem.Get<ActionBlockerSystem>().CanInteract(user.Uid))
return false;
if (Harvest && !Dead)
@@ -651,7 +651,7 @@ namespace Content.Server.Botany.Components
var user = eventArgs.User;
var usingItem = eventArgs.Using;
if (usingItem.Deleted || !EntitySystem.Get<ActionBlockerSystem>().CanInteract(user))
if (usingItem.Deleted || !EntitySystem.Get<ActionBlockerSystem>().CanInteract(user.Uid))
return false;
if (usingItem.TryGetComponent(out SeedComponent? seeds))

View File

@@ -148,7 +148,7 @@ namespace Content.Server.Buckle.Components
return false;
}
if (!EntitySystem.Get<ActionBlockerSystem>().CanInteract(user))
if (!EntitySystem.Get<ActionBlockerSystem>().CanInteract(user.Uid))
{
user.PopupMessage(Loc.GetString("buckle-component-cannot-do-that-message"));
return false;
@@ -303,7 +303,7 @@ namespace Content.Server.Buckle.Components
return false;
}
if (!EntitySystem.Get<ActionBlockerSystem>().CanInteract(user))
if (!EntitySystem.Get<ActionBlockerSystem>().CanInteract(user.Uid))
{
user.PopupMessage(Loc.GetString("buckle-component-cannot-do-that-message"));
return false;

View File

@@ -165,7 +165,7 @@ namespace Content.Server.Chemistry.Components
var actionBlocker = EntitySystem.Get<ActionBlockerSystem>();
//Check if player can interact in their current state
if (!actionBlocker.CanInteract(playerEntity) || !actionBlocker.CanUse(playerEntity.Uid))
if (!actionBlocker.CanInteract(playerEntity.Uid) || !actionBlocker.CanUse(playerEntity.Uid))
return false;
//Check if device is powered
if (needsPower && !Powered)

View File

@@ -218,7 +218,7 @@ namespace Content.Server.Chemistry.Components
var actionBlocker = EntitySystem.Get<ActionBlockerSystem>();
//Check if player can interact in their current state
if (!actionBlocker.CanInteract(playerEntity) || !actionBlocker.CanUse(playerEntity.Uid))
if (!actionBlocker.CanInteract(playerEntity.Uid) || !actionBlocker.CanUse(playerEntity.Uid))
return false;
//Check if device is powered
if (needsPower && !Powered)

View File

@@ -67,7 +67,7 @@ namespace Content.Server.Climbing.Components
/// <returns></returns>
private bool CanVault(IEntity user, IEntity target, out string reason)
{
if (!EntitySystem.Get<ActionBlockerSystem>().CanInteract(user))
if (!EntitySystem.Get<ActionBlockerSystem>().CanInteract(user.Uid))
{
reason = Loc.GetString("comp-climbable-cant-interact");
return false;
@@ -107,7 +107,7 @@ namespace Content.Server.Climbing.Components
/// <returns></returns>
private bool CanVault(IEntity user, IEntity dragged, IEntity target, out string reason)
{
if (!EntitySystem.Get<ActionBlockerSystem>().CanInteract(user))
if (!EntitySystem.Get<ActionBlockerSystem>().CanInteract(user.Uid))
{
reason = Loc.GetString("comp-climbable-cant-interact");
return false;

View File

@@ -297,7 +297,7 @@ namespace Content.Server.Construction
var user = args.SenderSession.AttachedEntity;
if (user == null || !Get<ActionBlockerSystem>().CanInteract(user)) return;
if (user == null || !Get<ActionBlockerSystem>().CanInteract(user.Uid)) return;
if (!user.TryGetComponent(out HandsComponent? hands)) return;
@@ -398,7 +398,7 @@ namespace Content.Server.Construction
}
if (user == null
|| !Get<ActionBlockerSystem>().CanInteract(user)
|| !Get<ActionBlockerSystem>().CanInteract(user.Uid)
|| !user.TryGetComponent(out HandsComponent? hands) || hands.GetActiveHand == null
|| !user.InRangeUnobstructed(ev.Location, ignoreInsideBlocker:constructionPrototype.CanBuildInImpassable))
{

View File

@@ -83,7 +83,7 @@ namespace Content.Server.Cuffs
else
{
// Check if the user can interact.
if (!_actionBlockerSystem.CanInteract(userEntity))
if (!_actionBlockerSystem.CanInteract(userEntity.Uid))
{
args.Cancel();
}

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;

View File

@@ -99,7 +99,7 @@ namespace Content.Server.Extinguisher
private void SetSafety(IEntity user, bool state)
{
if (!EntitySystem.Get<ActionBlockerSystem>().CanInteract(user) || !_hasSafety)
if (!EntitySystem.Get<ActionBlockerSystem>().CanInteract(user.Uid) || !_hasSafety)
return;
_safety = state;

View File

@@ -86,7 +86,7 @@ namespace Content.Server.Fluids.Components
async Task<bool> IAfterInteract.AfterInteract(AfterInteractEventArgs eventArgs)
{
if (!EntitySystem.Get<ActionBlockerSystem>().CanInteract(eventArgs.User))
if (!EntitySystem.Get<ActionBlockerSystem>().CanInteract(eventArgs.User.Uid))
return false;
if (CurrentVolume <= 0)

View File

@@ -80,9 +80,9 @@ namespace Content.Server.HandLabeler
private bool CheckInteract(ICommonSession session)
{
if (session.AttachedEntity is not { } entity
|| !Get<ActionBlockerSystem>().CanInteract(entity)
|| !Get<ActionBlockerSystem>().CanUse(entity.Uid))
if (session.AttachedEntityUid is not { } uid
|| !Get<ActionBlockerSystem>().CanInteract(uid)
|| !Get<ActionBlockerSystem>().CanUse(uid))
return false;
return true;

View File

@@ -319,7 +319,7 @@ namespace Content.Server.Instruments
if ((!Handheld && InstrumentPlayer != null)
|| (Handheld && actor.PlayerSession != InstrumentPlayer)
|| !EntitySystem.Get<ActionBlockerSystem>().CanInteract(user)) return;
|| !EntitySystem.Get<ActionBlockerSystem>().CanInteract(user.Uid)) return;
InstrumentPlayer = actor.PlayerSession;
OpenUserInterface(InstrumentPlayer);
@@ -351,8 +351,8 @@ namespace Content.Server.Instruments
var maxMidiBatchDropped = _instrumentSystem.MaxMidiBatchesDropped;
if (_instrumentPlayer != null
&& (_instrumentPlayer.AttachedEntity == null
|| !EntitySystem.Get<ActionBlockerSystem>().CanInteract(_instrumentPlayer.AttachedEntity)))
&& (_instrumentPlayer.AttachedEntityUid == null
|| !EntitySystem.Get<ActionBlockerSystem>().CanInteract(_instrumentPlayer.AttachedEntityUid.Value)))
{
InstrumentPlayer = null;
Clean();

View File

@@ -133,7 +133,7 @@ namespace Content.Server.Interaction
return;
}
if (!_actionBlockerSystem.CanInteract(userEntity))
if (!_actionBlockerSystem.CanInteract(userEntity.Uid))
return;
if (!EntityManager.TryGetEntity(msg.Dropped, out var dropped))
@@ -293,7 +293,7 @@ namespace Content.Server.Interaction
if (!ValidateInteractAndFace(user, coordinates))
return;
if (!_actionBlockerSystem.CanInteract(user))
if (!_actionBlockerSystem.CanInteract(user.Uid))
return;
// Get entity clicked upon from UID if valid UID, if not assume no entity clicked upon and null
@@ -367,7 +367,7 @@ namespace Content.Server.Interaction
/// </summary>
public void InteractHand(IEntity user, IEntity target)
{
if (!_actionBlockerSystem.CanInteract(user))
if (!_actionBlockerSystem.CanInteract(user.Uid))
return;
// all interactions should only happen when in range / unobstructed, so no range check is needed

View File

@@ -76,7 +76,7 @@ namespace Content.Server.Light.Components
async Task<bool> IInteractUsing.InteractUsing(InteractUsingEventArgs eventArgs)
{
if (!EntitySystem.Get<ActionBlockerSystem>().CanInteract(eventArgs.User)) return false;
if (!EntitySystem.Get<ActionBlockerSystem>().CanInteract(eventArgs.User.Uid)) return false;
if (!_cellSlot.InsertCell(eventArgs.Using)) return false;
Dirty();
return true;

View File

@@ -67,7 +67,7 @@ namespace Content.Server.Light.EntitySystems
return;
// standard interaction checks
if (!_blocker.CanInteract(eventArgs.User)) return;
if (!_blocker.CanInteract(eventArgs.User.Uid)) return;
if (eventArgs.Used != null)
{

View File

@@ -32,7 +32,7 @@ namespace Content.Server.Medical.Components
return true;
}
if (!EntitySystem.Get<ActionBlockerSystem>().CanInteract(eventArgs.User))
if (!EntitySystem.Get<ActionBlockerSystem>().CanInteract(eventArgs.User.Uid))
{
return true;
}

View File

@@ -75,7 +75,7 @@ namespace Content.Server.Medical
private void OnRelayMovement(EntityUid uid, MedicalScannerComponent component, RelayMovementEntityEvent args)
{
if (_blocker.CanInteract(args.Entity))
if (_blocker.CanInteract(args.Entity.Uid))
{
if (_gameTiming.CurTime <
component.LastInternalOpenAttempt + MedicalScannerComponent.InternalOpenAttemptDelay)

View File

@@ -153,8 +153,8 @@ namespace Content.Server.ParticleAccelerator.Components
}
if (obj.Session.AttachedEntity == null ||
!EntitySystem.Get<ActionBlockerSystem>().CanInteract(obj.Session.AttachedEntity))
if (obj.Session.AttachedEntityUid == null ||
!EntitySystem.Get<ActionBlockerSystem>().CanInteract(obj.Session.AttachedEntityUid.Value))
{
return;
}

View File

@@ -31,7 +31,7 @@ namespace Content.Server.Power.Components
/// <inheritdoc />
async Task<bool> IAfterInteract.AfterInteract(AfterInteractEventArgs eventArgs)
{
if (!EntitySystem.Get<ActionBlockerSystem>().CanInteract(eventArgs.User))
if (!EntitySystem.Get<ActionBlockerSystem>().CanInteract(eventArgs.User.Uid))
return false;
if (_cablePrototypeID == null)

View File

@@ -38,7 +38,7 @@ namespace Content.Server.Shuttles
{
if (comp.Console == null) continue;
if (!_blocker.CanInteract(comp.Owner))
if (!_blocker.CanInteract(comp.OwnerUid))
{
toRemove.Add(comp);
}
@@ -122,7 +122,7 @@ namespace Content.Server.Shuttles
public void AddPilot(IEntity entity, ShuttleConsoleComponent component)
{
if (!_blocker.CanInteract(entity) ||
if (!_blocker.CanInteract(entity.Uid) ||
!entity.TryGetComponent(out PilotComponent? pilotComponent) ||
component.SubscribedPilots.Contains(pilotComponent))
{

View File

@@ -160,7 +160,7 @@ namespace Content.Server.Strip
bool Check()
{
if (!EntitySystem.Get<ActionBlockerSystem>().CanInteract(user))
if (!EntitySystem.Get<ActionBlockerSystem>().CanInteract(user.Uid))
return false;
if (item == null)
@@ -225,7 +225,7 @@ namespace Content.Server.Strip
bool Check()
{
if (!EntitySystem.Get<ActionBlockerSystem>().CanInteract(user))
if (!EntitySystem.Get<ActionBlockerSystem>().CanInteract(user.Uid))
return false;
if (item == null)
@@ -290,7 +290,7 @@ namespace Content.Server.Strip
bool Check()
{
if (!EntitySystem.Get<ActionBlockerSystem>().CanInteract(user))
if (!EntitySystem.Get<ActionBlockerSystem>().CanInteract(user.Uid))
return false;
if (!inventory.HasSlot(slot))
@@ -346,7 +346,7 @@ namespace Content.Server.Strip
bool Check()
{
if (!EntitySystem.Get<ActionBlockerSystem>().CanInteract(user))
if (!EntitySystem.Get<ActionBlockerSystem>().CanInteract(user.Uid))
return false;
if (!hands.HasHand(hand))

View File

@@ -104,7 +104,7 @@ namespace Content.Server.Stunnable
private void OnInteractUsing(EntityUid uid, StunbatonComponent comp, InteractUsingEvent args)
{
if (!Get<ActionBlockerSystem>().CanInteract(args.User))
if (!Get<ActionBlockerSystem>().CanInteract(args.User.Uid))
return;
if (EntityManager.TryGetComponent<PowerCellSlotComponent>(uid, out var cellslot))

View File

@@ -59,7 +59,7 @@ namespace Content.Server.Tabletop
return;
// Check that the entity can interact with the game board.
if(_actionBlockerSystem.CanInteract(args.User))
if(_actionBlockerSystem.CanInteract(args.User.Uid))
OpenSessionFor(actor.PlayerSession, uid);
}

View File

@@ -89,7 +89,7 @@ namespace Content.Server.Weapon.Ranged
private bool UserCanFire(IEntity user)
{
return (UserCanFireHandler == null || UserCanFireHandler(user)) && EntitySystem.Get<ActionBlockerSystem>().CanInteract(user);
return (UserCanFireHandler == null || UserCanFireHandler(user)) && EntitySystem.Get<ActionBlockerSystem>().CanInteract(user.Uid);
}
/// <inheritdoc />

View File

@@ -18,9 +18,6 @@ namespace Content.Shared.ActionBlocker
[UsedImplicitly]
public class ActionBlockerSystem : EntitySystem
{
// TODO: Make the EntityUid the main overload for all these methods.
// TODO: Move each of these to their relevant EntitySystems?
public bool CanMove(EntityUid uid)
{
var ev = new MovementAttemptEvent(uid);
@@ -29,18 +26,12 @@ namespace Content.Shared.ActionBlocker
return !ev.Cancelled;
}
public bool CanInteract(IEntity entity)
{
var ev = new InteractionAttemptEvent(entity);
RaiseLocalEvent(entity.Uid, ev);
return !ev.Cancelled;
}
public bool CanInteract(EntityUid uid)
{
return CanInteract(EntityManager.GetEntity(uid));
var ev = new InteractionAttemptEvent(uid);
RaiseLocalEvent(uid, ev);
return !ev.Cancelled;
}
public bool CanUse(EntityUid uid)

View File

@@ -4,11 +4,11 @@ namespace Content.Shared.Interaction.Events
{
public class InteractionAttemptEvent : CancellableEntityEventArgs
{
public InteractionAttemptEvent(IEntity entity)
public InteractionAttemptEvent(EntityUid uid)
{
Entity = entity;
Uid = uid;
}
public IEntity Entity { get; }
public EntityUid Uid { get; }
}
}

View File

@@ -373,7 +373,7 @@ namespace Content.Shared.Interaction
/// </summary>
public async Task InteractUsing(IEntity user, IEntity used, IEntity target, EntityCoordinates clickLocation)
{
if (!_actionBlockerSystem.CanInteract(user))
if (!_actionBlockerSystem.CanInteract(user.Uid))
return;
if (InteractDoBefore(user, used, target, clickLocation, true))
@@ -444,7 +444,7 @@ namespace Content.Shared.Interaction
delayComponent.BeginDelay();
}
if (!_actionBlockerSystem.CanInteract(user) || !_actionBlockerSystem.CanUse(user.Uid))
if (!_actionBlockerSystem.CanInteract(user.Uid) || !_actionBlockerSystem.CanUse(user.Uid))
return;
// all activates should only fire when in range / unobstructed

View File

@@ -34,7 +34,7 @@ namespace Content.Shared.Storage
bool IDraggable.Drop(DragDropEvent eventArgs)
{
if (!EntitySystem.Get<ActionBlockerSystem>().CanInteract(eventArgs.User))
if (!EntitySystem.Get<ActionBlockerSystem>().CanInteract(eventArgs.User.Uid))
{
return false;
}

View File

@@ -17,7 +17,7 @@ namespace Content.Shared.Strip.Components
{
return by != Owner
&& by.HasComponent<SharedHandsComponent>()
&& EntitySystem.Get<ActionBlockerSystem>().CanInteract(by);
&& EntitySystem.Get<ActionBlockerSystem>().CanInteract(by.Uid);
}
bool IDraggable.CanDrop(CanDropEvent args)

View File

@@ -182,7 +182,7 @@ namespace Content.Shared.Verbs
// A large number of verbs need to check action blockers. Instead of repeatedly having each system individually
// call ActionBlocker checks, just cache it for the verb request.
var actionBlockerSystem = EntitySystem.Get<ActionBlockerSystem>();
CanInteract = force || actionBlockerSystem.CanInteract(user);
CanInteract = force || actionBlockerSystem.CanInteract(user.Uid);
if (!user.TryGetComponent(out Hands) ||
!actionBlockerSystem.CanUse(user.Uid))