2021-06-19 10:03:24 +02:00
|
|
|
namespace Content.Shared.Interaction.Events
|
|
|
|
|
{
|
2022-03-09 19:40:07 +13:00
|
|
|
/// <summary>
|
|
|
|
|
/// Raised Directed at a user to check whether they are allowed to attack a target.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <remarks>
|
|
|
|
|
/// Combat will also check the general interaction blockers, so this event should only be used for combat-specific
|
|
|
|
|
/// action blocking.
|
|
|
|
|
/// </remarks>
|
2022-02-16 00:23:23 -07:00
|
|
|
public sealed class AttackAttemptEvent : CancellableEntityEventArgs
|
2021-06-19 10:03:24 +02:00
|
|
|
{
|
2022-01-04 01:22:28 -08:00
|
|
|
public EntityUid Uid { get; }
|
|
|
|
|
public EntityUid? Target { get; }
|
|
|
|
|
|
|
|
|
|
public AttackAttemptEvent(EntityUid uid, EntityUid? target = null)
|
2021-06-19 10:03:24 +02:00
|
|
|
{
|
2021-11-09 13:40:27 +01:00
|
|
|
Uid = uid;
|
2022-01-04 01:22:28 -08:00
|
|
|
Target = target;
|
2021-06-19 10:03:24 +02:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|