InteractionAttemptEvent.cs 1.1 KB

1234567891011121314151617181920212223242526272829303132333435
  1. namespace Content.Shared.Interaction.Events
  2. {
  3. /// <summary>
  4. /// Event raised directed at a user to see if they can perform a generic interaction.
  5. /// </summary>
  6. [ByRefEvent]
  7. public struct InteractionAttemptEvent(EntityUid uid, EntityUid? target)
  8. {
  9. public bool Cancelled;
  10. public readonly EntityUid Uid = uid;
  11. public readonly EntityUid? Target = target;
  12. }
  13. /// <summary>
  14. /// Raised to determine whether an entity is conscious to perform an action.
  15. /// </summary>
  16. [ByRefEvent]
  17. public struct ConsciousAttemptEvent(EntityUid uid)
  18. {
  19. public bool Cancelled;
  20. public readonly EntityUid Uid = uid;
  21. }
  22. /// <summary>
  23. /// Event raised directed at the target entity of an interaction to see if the user is allowed to perform some
  24. /// generic interaction.
  25. /// </summary>
  26. [ByRefEvent]
  27. public struct GettingInteractedWithAttemptEvent(EntityUid uid, EntityUid? target)
  28. {
  29. public bool Cancelled;
  30. public readonly EntityUid Uid = uid;
  31. public readonly EntityUid? Target = target;
  32. }
  33. }