RangedInteract.cs 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. using JetBrains.Annotations;
  2. using Robust.Shared.Map;
  3. namespace Content.Shared.Interaction
  4. {
  5. /// <summary>
  6. /// Raised when an entity is interacted with that is out of the user entity's range of direct use.
  7. /// </summary>
  8. [PublicAPI]
  9. public sealed class RangedInteractEvent : HandledEntityEventArgs
  10. {
  11. /// <summary>
  12. /// Entity that triggered the interaction.
  13. /// </summary>
  14. public EntityUid UserUid { get; }
  15. /// <summary>
  16. /// Entity that the user used to interact.
  17. /// </summary>
  18. public EntityUid UsedUid { get; }
  19. /// <summary>
  20. /// Entity that was interacted on.
  21. /// </summary>
  22. public EntityUid TargetUid { get; }
  23. /// <summary>
  24. /// Location that the user clicked outside of their interaction range.
  25. /// </summary>
  26. public EntityCoordinates ClickLocation { get; }
  27. public RangedInteractEvent(EntityUid user, EntityUid used, EntityUid target, EntityCoordinates clickLocation)
  28. {
  29. UserUid = user;
  30. UsedUid = used;
  31. TargetUid = target;
  32. ClickLocation = clickLocation;
  33. }
  34. }
  35. }