1
0

ThrowAttemptEvent.cs 881 B

12345678910111213141516171819202122232425262728
  1. namespace Content.Shared.Throwing
  2. {
  3. public sealed class ThrowAttemptEvent : CancellableEntityEventArgs
  4. {
  5. public ThrowAttemptEvent(EntityUid uid, EntityUid itemUid)
  6. {
  7. Uid = uid;
  8. ItemUid = itemUid;
  9. }
  10. public EntityUid Uid { get; }
  11. public EntityUid ItemUid { get; }
  12. }
  13. /// <summary>
  14. /// Raised on the item entity that is thrown.
  15. /// </summary>
  16. /// <param name="User">The user that threw this entity.</param>
  17. /// <param name="Cancelled">Whether or not the throw should be cancelled.</param>
  18. [ByRefEvent]
  19. public record struct ThrowItemAttemptEvent(EntityUid User, bool Cancelled = false);
  20. /// <summary>
  21. /// Raised when we try to pushback an entity from throwing
  22. /// </summary>
  23. public sealed class ThrowPushbackAttemptEvent : CancellableEntityEventArgs {}
  24. }