Reduce action blocker uses and add target entity to CanInteract (#6655)
This commit is contained in:
@@ -2,13 +2,34 @@
|
||||
|
||||
namespace Content.Shared.Interaction.Events
|
||||
{
|
||||
public class InteractionAttemptEvent : CancellableEntityEventArgs
|
||||
/// <summary>
|
||||
/// Event raised directed at a user to see if they can perform a generic interaction.
|
||||
/// </summary>
|
||||
public sealed class InteractionAttemptEvent : CancellableEntityEventArgs
|
||||
{
|
||||
public InteractionAttemptEvent(EntityUid uid)
|
||||
public InteractionAttemptEvent(EntityUid uid, EntityUid? target)
|
||||
{
|
||||
Uid = uid;
|
||||
Target = target;
|
||||
}
|
||||
|
||||
public EntityUid Uid { get; }
|
||||
public EntityUid? Target { get; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Event raised directed at the target entity of an interaction to see if the user is allowed to perform some
|
||||
/// generic interaction.
|
||||
/// </summary>
|
||||
public sealed class GettingInteractedWithAttemptEvent : CancellableEntityEventArgs
|
||||
{
|
||||
public GettingInteractedWithAttemptEvent(EntityUid uid, EntityUid? target)
|
||||
{
|
||||
Uid = uid;
|
||||
Target = target;
|
||||
}
|
||||
|
||||
public EntityUid Uid { get; }
|
||||
public EntityUid? Target { get; }
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user