mirror of
https://github.com/WWhiteDreamProject/wwdpublic.git
synced 2026-04-17 05:27:38 +03:00
Add more info to GettingAttackedAttemptEvent (#28548)
(cherry picked from commit def04cdaf52ee4e39fe269d3a92d94d02e1e3dc0)
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user