Projectile and damage events now include the origin (#19322)

This commit is contained in:
PixelTK
2023-08-27 17:28:59 +01:00
committed by GitHub
parent 0ec8daa474
commit 9fef38ab60
3 changed files with 12 additions and 9 deletions

View File

@@ -1,4 +1,5 @@
using System.Numerics;
using Content.Shared.Damage;
using Content.Shared.DoAfter;
using Content.Shared.Interaction;
using Content.Shared.Projectiles;
@@ -152,13 +153,13 @@ public sealed class ImpactEffectEvent : EntityEventArgs
}
/// <summary>
/// Raised when entity is just about to be hit with projectile but can reflect it
/// Raised when an entity is just about to be hit with a projectile but can reflect it
/// </summary>
[ByRefEvent]
public record struct ProjectileReflectAttemptEvent(EntityUid ProjUid, ProjectileComponent Component, bool Cancelled);
/// <summary>
/// Raised when projectile hits other entity
/// Raised when a projectile hits an entity
/// </summary>
[ByRefEvent]
public readonly record struct ProjectileHitEvent(EntityUid Target);
public record struct ProjectileHitEvent(DamageSpecifier Damage, EntityUid Target, EntityUid? Shooter = null);