Files
tbd-station-14/Content.Shared/Actions/Events/DisarmAttemptEvent.cs
metalgearsloth 8ab0e59db6 Refactor disarms (#36546)
* Refactor disarms

- Move client stuff to shared
- Cleanup a bunch of stuff
- Ref events
- Fix the swing sound mispredict (I noticed it on target dummies).

* Revert this change

* minor review

* Rebiew

---------

Co-authored-by: Milon <milonpl.git@proton.me>
2025-04-19 11:38:22 +10:00

22 lines
600 B
C#

namespace Content.Shared.Actions.Events;
/// <summary>
/// Raised directed on the target OR their actively held entity.
/// </summary>
[ByRefEvent]
public record struct DisarmAttemptEvent
{
public readonly EntityUid TargetUid;
public readonly EntityUid DisarmerUid;
public readonly EntityUid? TargetItemInHandUid;
public bool Cancelled;
public DisarmAttemptEvent(EntityUid targetUid, EntityUid disarmerUid, EntityUid? targetItemInHandUid = null)
{
TargetUid = targetUid;
DisarmerUid = disarmerUid;
TargetItemInHandUid = targetItemInHandUid;
}
}