]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Add more info to GettingAttackedAttemptEvent (#28548)
authorDrSmugleaf <10968691+DrSmugleaf@users.noreply.github.com>
Mon, 3 Jun 2024 13:30:47 +0000 (06:30 -0700)
committerGitHub <noreply@github.com>
Mon, 3 Jun 2024 13:30:47 +0000 (09:30 -0400)
Content.Shared/ActionBlocker/ActionBlockerSystem.cs
Content.Shared/Interaction/Events/GettingAttackedAttemptEvent.cs

index d2883b5ef5be410d942cb7fcaf7dfa5b79c91934..f1c77fda43b243831743e6f7e60e4a2651a2d090 100644 (file)
@@ -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;
         }
index ed7379fd72e55e54a25ff140ec9cd7e3e281c8cc..d37c810e3fafb9167954da2c22d574f710e05d47 100644 (file)
@@ -4,4 +4,4 @@ namespace Content.Shared.Interaction.Events;
 /// Raised directed on the target entity when being attacked.
 /// </summary>
 [ByRefEvent]
-public record struct GettingAttackedAttemptEvent(bool Cancelled);
+public record struct GettingAttackedAttemptEvent(EntityUid Attacker, EntityUid? Weapon, bool Disarm, bool Cancelled = false);