From def04cdaf52ee4e39fe269d3a92d94d02e1e3dc0 Mon Sep 17 00:00:00 2001 From: DrSmugleaf <10968691+DrSmugleaf@users.noreply.github.com> Date: Mon, 3 Jun 2024 06:30:47 -0700 Subject: [PATCH] Add more info to GettingAttackedAttemptEvent (#28548) --- Content.Shared/ActionBlocker/ActionBlockerSystem.cs | 6 +----- .../Interaction/Events/GettingAttackedAttemptEvent.cs | 2 +- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/Content.Shared/ActionBlocker/ActionBlockerSystem.cs b/Content.Shared/ActionBlocker/ActionBlockerSystem.cs index d2883b5ef5..f1c77fda43 100644 --- a/Content.Shared/ActionBlocker/ActionBlockerSystem.cs +++ b/Content.Shared/ActionBlocker/ActionBlockerSystem.cs @@ -1,13 +1,9 @@ -using Content.Shared.Bed.Sleep; using Content.Shared.Body.Events; -using Content.Shared.DragDrop; using Content.Shared.Emoting; using Content.Shared.Hands; using Content.Shared.Interaction; using Content.Shared.Interaction.Events; using Content.Shared.Item; -using Content.Shared.Mobs; -using Content.Shared.Mobs.Components; using Content.Shared.Movement.Components; using Content.Shared.Movement.Events; using Content.Shared.Speech; @@ -194,7 +190,7 @@ namespace Content.Shared.ActionBlocker if (target == null) return true; - var tev = new GettingAttackedAttemptEvent(); + var tev = new GettingAttackedAttemptEvent(uid, weapon, disarm); RaiseLocalEvent(target.Value, ref tev); return !tev.Cancelled; } diff --git a/Content.Shared/Interaction/Events/GettingAttackedAttemptEvent.cs b/Content.Shared/Interaction/Events/GettingAttackedAttemptEvent.cs index ed7379fd72..d37c810e3f 100644 --- a/Content.Shared/Interaction/Events/GettingAttackedAttemptEvent.cs +++ b/Content.Shared/Interaction/Events/GettingAttackedAttemptEvent.cs @@ -4,4 +4,4 @@ namespace Content.Shared.Interaction.Events; /// Raised directed on the target entity when being attacked. /// [ByRefEvent] -public record struct GettingAttackedAttemptEvent(bool Cancelled); +public record struct GettingAttackedAttemptEvent(EntityUid Attacker, EntityUid? Weapon, bool Disarm, bool Cancelled = false);