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>
This commit is contained in:
@@ -1,31 +1,33 @@
|
||||
namespace Content.Shared.CombatMode
|
||||
namespace Content.Shared.CombatMode;
|
||||
|
||||
[ByRefEvent]
|
||||
public record struct DisarmedEvent(EntityUid Target, EntityUid Source, float PushProb)
|
||||
{
|
||||
public sealed class DisarmedEvent : HandledEntityEventArgs
|
||||
{
|
||||
/// <summary>
|
||||
/// The entity being disarmed.
|
||||
/// </summary>
|
||||
public EntityUid Target { get; init; }
|
||||
/// <summary>
|
||||
/// The entity being disarmed.
|
||||
/// </summary>
|
||||
public readonly EntityUid Target = Target;
|
||||
|
||||
/// <summary>
|
||||
/// The entity performing the disarm.
|
||||
/// </summary>
|
||||
public EntityUid Source { get; init; }
|
||||
/// <summary>
|
||||
/// The entity performing the disarm.
|
||||
/// </summary>
|
||||
public readonly EntityUid Source = Source;
|
||||
|
||||
/// <summary>
|
||||
/// Probability for push/knockdown.
|
||||
/// </summary>
|
||||
public float PushProbability { get; init; }
|
||||
/// <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 { get; set; } = "";
|
||||
/// <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 { get; set; }
|
||||
}
|
||||
/// <summary>
|
||||
/// Whether the entity was successfully stunned from a shove.
|
||||
/// </summary>
|
||||
public bool IsStunned;
|
||||
|
||||
public bool Handled;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user