Files
tbd-station-14/Content.Shared/CombatMode/DisarmedEvent.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

34 lines
873 B
C#

namespace Content.Shared.CombatMode;
[ByRefEvent]
public record struct DisarmedEvent(EntityUid Target, EntityUid Source, float PushProb)
{
/// <summary>
/// The entity being disarmed.
/// </summary>
public readonly EntityUid Target = Target;
/// <summary>
/// The entity performing the disarm.
/// </summary>
public readonly EntityUid Source = Source;
/// <summary>
/// Probability for push/knockdown.
/// </summary>
public readonly float PushProbability = PushProb;
/// <summary>
/// Prefix for the popup message that will be displayed on a successful push.
/// Should be set before returning.
/// </summary>
public string PopupPrefix = "";
/// <summary>
/// Whether the entity was successfully stunned from a shove.
/// </summary>
public bool IsStunned;
public bool Handled;
}