using System; using Robust.Shared.Analyzers; using Robust.Shared.GameObjects; namespace Content.Server.Act { /// /// Implements behavior when an entity is disarmed. /// [RequiresExplicitImplementation, Obsolete("Use the directed event instead.")] public interface IDisarmedAct { /// /// Behavior when the entity is disarmed. /// Return true to prevent the default disarm behavior, /// or rest of IDisarmedAct behaviors that come after this one from happening. /// bool Disarmed(DisarmedActEvent @event); /// /// Priority for this disarm act. /// Used to determine act execution order. /// int Priority => 0; } public class DisarmedActEvent : HandledEntityEventArgs { /// /// The entity being disarmed. /// public IEntity? Target { get; init; } /// /// The entity performing the disarm. /// public IEntity? Source { get; init; } /// /// Probability for push/knockdown. /// public float PushProbability { get; init; } } }