using Content.Shared.Alert; using Content.Shared.DoAfter; using Content.Shared.Popups; using Robust.Shared.Serialization; namespace Content.Shared.Stunnable; /// /// This contains all the events raised by the SharedStunSystem /// /// /// Raised directed on an entity when it is stunned. /// [ByRefEvent] public record struct StunnedEvent; /// /// Raised directed on an entity before it is knocked down to see if it should be cancelled, and to determine /// knocked down arguments. /// [ByRefEvent] public record struct KnockDownAttemptEvent(bool AutoStand, bool Drop) { public bool Cancelled; } /// /// Raised directed on an entity when it is knocked down. /// [ByRefEvent] public record struct KnockedDownEvent(TimeSpan Time); /// /// Raised on an entity that needs to refresh its knockdown modifiers /// [ByRefEvent] public record struct KnockedDownRefreshEvent() { public float SpeedModifier = 1f; public float FrictionModifier = 1f; } /// /// Raised directed on an entity when it tries to stand up /// /// If the attempt was cancelled, passes a recommended value to change autostand to. [ByRefEvent] public record struct StandUpAttemptEvent(bool Autostand) { public bool Cancelled = false; // Popup data to display to the entity if we so desire... public (string, PopupType)? Message = null; } /// /// Raises the default DoAfterTime for a stand-up attempt for other components to modify it. /// /// [ByRefEvent] public record struct GetStandUpTimeEvent(TimeSpan DoAfterTime); /// /// Raised when an entity is forcing itself to stand, allows for the stamina damage it is taking to be modified. /// This is raised before the stamina damage is taken so it can still fail if the entity does not have enough stamina. /// /// The stamina damage the entity will take when it forces itself to stand. [ByRefEvent] public record struct TryForceStandEvent(float Stamina); /// /// Raised when you click on the Knocked Down Alert /// public sealed partial class KnockedDownAlertEvent : BaseAlertEvent; /// /// The DoAfterEvent for trying to stand the slow and boring way. /// [ByRefEvent] [Serializable, NetSerializable] public sealed partial class TryStandDoAfterEvent : SimpleDoAfterEvent; /// /// An event sent by the client to the server to ask it very nicely to perform a forced stand-up. /// [Serializable, NetSerializable] public sealed class ForceStandUpEvent : EntityEventArgs;