TakeAmmoEvent.cs 863 B

12345678910111213141516171819202122232425262728293031
  1. using Robust.Shared.Map;
  2. namespace Content.Shared.Weapons.Ranged.Events;
  3. /// <summary>
  4. /// Raised on a gun when it would like to take the specified amount of ammo.
  5. /// </summary>
  6. public sealed class TakeAmmoEvent : EntityEventArgs
  7. {
  8. public readonly EntityUid? User;
  9. public readonly int Shots;
  10. public List<(EntityUid? Entity, IShootable Shootable)> Ammo;
  11. /// <summary>
  12. /// If no ammo returned what is the reason for it?
  13. /// </summary>
  14. public string? Reason;
  15. /// <summary>
  16. /// Coordinates to spawn the ammo at.
  17. /// </summary>
  18. public EntityCoordinates Coordinates;
  19. public TakeAmmoEvent(int shots, List<(EntityUid? Entity, IShootable Shootable)> ammo, EntityCoordinates coordinates, EntityUid? user)
  20. {
  21. Shots = shots;
  22. Ammo = ammo;
  23. Coordinates = coordinates;
  24. User = user;
  25. }
  26. }