HOTFIX Fix pickup effects occurring with verb creation (#38705)

* fix: don't run pickup effects on verb creation

* review

* redundant

---------

Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>
This commit is contained in:
Perry Fraser
2025-10-11 15:42:10 -04:00
committed by GitHub
parent e89651c774
commit 5ade6688e7
9 changed files with 141 additions and 34 deletions

View File

@@ -1,5 +1,6 @@
using System.Numerics;
using Content.Shared.Hands.Components;
using Content.Shared.Hands.EntitySystems;
using JetBrains.Annotations;
using Robust.Shared.Map;
using Robust.Shared.Serialization;
@@ -156,6 +157,32 @@ namespace Content.Shared.Hands
}
}
/// <summary>
/// Raised against an item being picked up before it is actually inserted
/// into the pick-up-ers hand container. This can be handled with side
/// effects, and may be canceled preventing the pickup in a way that
/// <see cref="SharedHandsSystem.CanPickupToHand"/> and similar don't see.
/// </summary>
/// <param name="User">The user picking up the item.</param>
/// <param name="Cancelled">
/// If true, the item will not be equipped into the user's hand.
/// </param>
[ByRefEvent]
public record struct BeforeGettingEquippedHandEvent(EntityUid User, bool Cancelled = false);
/// <summary>
/// Raised against a mob picking up and item before it is actually inserted
/// into the pick-up-ers hand container. This can be handled with side
/// effects, and may be canceled preventing the pickup in a way that
/// <see cref="SharedHandsSystem.CanPickupToHand"/> and similar don't see.
/// </summary>
/// <param name="Item">The item being picked up.</param>
/// <param name="Cancelled">
/// If true, the item will not be equipped into the user's hand.
/// </param>
[ByRefEvent]
public record struct BeforeEquippingHandEvent(EntityUid Item, bool Cancelled = false);
/// <summary>
/// Raised when putting an entity into a hand slot
/// </summary>