diff --git a/Content.Client/Hands/Systems/HandVirtualItemSystem.cs b/Content.Client/Hands/Systems/HandVirtualItemSystem.cs index deb9f993a9..7c06bbc1c8 100644 --- a/Content.Client/Hands/Systems/HandVirtualItemSystem.cs +++ b/Content.Client/Hands/Systems/HandVirtualItemSystem.cs @@ -1,4 +1,5 @@ using Content.Client.Items; +using Content.Shared.Hands; using Content.Shared.Hands.Components; using JetBrains.Annotations; using Robust.Shared.GameObjects; @@ -6,7 +7,7 @@ using Robust.Shared.GameObjects; namespace Content.Client.Hands.Systems { [UsedImplicitly] - public sealed class HandVirtualItemSystem : EntitySystem + public sealed class HandVirtualItemSystem : SharedHandVirtualItemSystem { public override void Initialize() { diff --git a/Content.Server/Hands/Systems/HandVirtualItemSystem.cs b/Content.Server/Hands/Systems/HandVirtualItemSystem.cs index 448bc23776..f732f221ef 100644 --- a/Content.Server/Hands/Systems/HandVirtualItemSystem.cs +++ b/Content.Server/Hands/Systems/HandVirtualItemSystem.cs @@ -8,7 +8,7 @@ using Robust.Shared.GameObjects; namespace Content.Server.Hands.Systems { [UsedImplicitly] - public sealed class HandVirtualItemSystem : EntitySystem + public sealed class HandVirtualItemSystem : SharedHandVirtualItemSystem { public override void Initialize() { diff --git a/Content.Shared/Hands/SharedHandVirtualItemSystem.cs b/Content.Shared/Hands/SharedHandVirtualItemSystem.cs new file mode 100644 index 0000000000..ac3db9d714 --- /dev/null +++ b/Content.Shared/Hands/SharedHandVirtualItemSystem.cs @@ -0,0 +1,20 @@ +using Content.Shared.Hands.Components; +using Content.Shared.Inventory.Events; +using Robust.Shared.GameObjects; + +namespace Content.Shared.Hands; + +public abstract class SharedHandVirtualItemSystem : EntitySystem +{ + public override void Initialize() + { + base.Initialize(); + + SubscribeLocalEvent(OnBeingEquippedAttempt); + } + + private void OnBeingEquippedAttempt(EntityUid uid, HandVirtualItemComponent component, BeingEquippedAttemptEvent args) + { + args.Cancel(); + } +}