UseInHandEvent.cs 783 B

12345678910111213141516171819202122232425262728
  1. using Content.Shared.Clothing.EntitySystems;
  2. using Content.Shared.Timing;
  3. using JetBrains.Annotations;
  4. namespace Content.Shared.Interaction.Events;
  5. /// <summary>
  6. /// Raised when using the entity in your hands.
  7. /// </summary>
  8. [PublicAPI]
  9. public sealed class UseInHandEvent : HandledEntityEventArgs
  10. {
  11. /// <summary>
  12. /// Entity holding the item in their hand.
  13. /// </summary>
  14. public EntityUid User;
  15. /// <summary>
  16. /// Whether or not to apply a UseDelay when used.
  17. /// Mostly used by the <see cref="ClothingSystem"/> quick-equip to not apply the delay to entities that have the <see cref="UseDelayComponent"/>.
  18. /// </summary>
  19. public bool ApplyDelay = true;
  20. public UseInHandEvent(EntityUid user)
  21. {
  22. User = user;
  23. }
  24. }