Add more info to GettingAttackedAttemptEvent (#28548)

(cherry picked from commit def04cdaf52ee4e39fe269d3a92d94d02e1e3dc0)
This commit is contained in:
DrSmugleaf
2024-06-03 06:30:47 -07:00
committed by Spatison
parent e3eedfed93
commit 2b06a478cf
2 changed files with 2 additions and 2 deletions

View File

@@ -215,7 +215,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;
}

View 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);