using Content.Shared.Weapons.Ranged.Components; namespace Content.Shared.Weapons.Ranged.Events; /// /// Raised on a gun when someone is attempting to shoot it. /// Cancel this event to prevent it from shooting. /// [ByRefEvent] public record struct ShotAttemptedEvent { /// /// The user attempting to shoot the gun. /// public EntityUid User; /// /// The gun being shot. /// public Entity Used; public bool Cancelled { get; private set; } /// /// Prevent the gun from shooting /// public void Cancel() { Cancelled = true; } /// /// Allow the gun to shoot again, only use if you know what you are doing /// public void Uncancel() { Cancelled = false; } }