Files
crystall-punk-14/Content.Shared/Interaction/InteractHand.cs

55 lines
1.5 KiB
C#
Raw Permalink Normal View History

using JetBrains.Annotations;
using Robust.Shared.Map;
2021-06-09 22:19:39 +02:00
namespace Content.Shared.Interaction
{
public sealed class InteractHandEventArgs : EventArgs, ITargetedInteractEventArgs
{
2021-12-04 12:47:09 +01:00
public InteractHandEventArgs(EntityUid user, EntityUid target)
{
User = user;
Target = target;
}
2021-12-04 12:47:09 +01:00
public EntityUid User { get; }
public EntityUid Target { get; }
}
/// <summary>
/// Raised directed on a target entity when it is interacted with by a user with an empty hand.
/// </summary>
[PublicAPI]
public sealed class InteractHandEvent : HandledEntityEventArgs, ITargetedInteractEventArgs
{
/// <summary>
/// Entity that triggered the interaction.
/// </summary>
2021-12-04 12:47:09 +01:00
public EntityUid User { get; }
/// <summary>
/// Entity that was interacted on.
/// </summary>
2021-12-04 12:47:09 +01:00
public EntityUid Target { get; }
2021-12-04 12:47:09 +01:00
public InteractHandEvent(EntityUid user, EntityUid target)
{
User = user;
Target = target;
}
}
2022-08-13 09:49:41 -04:00
/// <summary>
/// Raised on the user before interacting on an entity with bare hand.
/// Interaction is cancelled if this event is handled, so set it to true if you do custom interaction logic.
/// </summary>
public sealed class BeforeInteractHandEvent : HandledEntityEventArgs
{
public EntityUid Target { get; }
public BeforeInteractHandEvent(EntityUid target)
{
Target = target;
}
}
}