Make InteractionActivate check for hands like UserInteraction (#7277)
This commit is contained in:
@@ -7,24 +7,24 @@ using Content.Shared.Database;
|
|||||||
using Content.Shared.Hands.Components;
|
using Content.Shared.Hands.Components;
|
||||||
using Content.Shared.Input;
|
using Content.Shared.Input;
|
||||||
using Content.Shared.Interaction.Components;
|
using Content.Shared.Interaction.Components;
|
||||||
|
using Content.Shared.Interaction.Events;
|
||||||
|
using Content.Shared.Item;
|
||||||
using Content.Shared.Physics;
|
using Content.Shared.Physics;
|
||||||
using Content.Shared.Popups;
|
using Content.Shared.Popups;
|
||||||
using Content.Shared.Throwing;
|
using Content.Shared.Throwing;
|
||||||
using Content.Shared.Timing;
|
using Content.Shared.Timing;
|
||||||
using Content.Shared.Verbs;
|
using Content.Shared.Verbs;
|
||||||
|
using Content.Shared.Wall;
|
||||||
using JetBrains.Annotations;
|
using JetBrains.Annotations;
|
||||||
using Robust.Shared.Containers;
|
using Robust.Shared.Containers;
|
||||||
|
using Robust.Shared.Input;
|
||||||
using Robust.Shared.Input.Binding;
|
using Robust.Shared.Input.Binding;
|
||||||
using Robust.Shared.Map;
|
using Robust.Shared.Map;
|
||||||
using Robust.Shared.Physics;
|
using Robust.Shared.Physics;
|
||||||
|
using Robust.Shared.Player;
|
||||||
using Robust.Shared.Players;
|
using Robust.Shared.Players;
|
||||||
using Robust.Shared.Serialization;
|
using Robust.Shared.Serialization;
|
||||||
using Content.Shared.Wall;
|
|
||||||
using Content.Shared.Item;
|
|
||||||
using Robust.Shared.Player;
|
|
||||||
using Robust.Shared.Input;
|
|
||||||
using Robust.Shared.Timing;
|
using Robust.Shared.Timing;
|
||||||
using Content.Shared.Interaction.Events;
|
|
||||||
|
|
||||||
#pragma warning disable 618
|
#pragma warning disable 618
|
||||||
|
|
||||||
@@ -215,7 +215,6 @@ namespace Content.Shared.Interaction
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
// Does the user have hands?
|
// Does the user have hands?
|
||||||
Hand? hand;
|
|
||||||
if (!TryComp(user, out SharedHandsComponent? hands) || hands.ActiveHand == null)
|
if (!TryComp(user, out SharedHandsComponent? hands) || hands.ActiveHand == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@@ -736,6 +735,10 @@ namespace Content.Shared.Interaction
|
|||||||
if (checkAccess && !ContainerSystem.IsInSameOrParentContainer(user, used) && !CanAccessViaStorage(user, used))
|
if (checkAccess && !ContainerSystem.IsInSameOrParentContainer(user, used) && !CanAccessViaStorage(user, used))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
// Does the user have hands?
|
||||||
|
if (!HasComp<SharedHandsComponent>(user))
|
||||||
|
return false;
|
||||||
|
|
||||||
var activateMsg = new ActivateInWorldEvent(user, used);
|
var activateMsg = new ActivateInWorldEvent(user, used);
|
||||||
RaiseLocalEvent(used, activateMsg);
|
RaiseLocalEvent(used, activateMsg);
|
||||||
if (activateMsg.Handled)
|
if (activateMsg.Handled)
|
||||||
|
|||||||
Reference in New Issue
Block a user