2022-06-01 19:59:58 +10:00
|
|
|
using Robust.Shared.Map;
|
|
|
|
|
|
|
|
|
|
namespace Content.Shared.Weapons.Ranged.Events;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Raised on a gun when it would like to take the specified amount of ammo.
|
|
|
|
|
/// </summary>
|
|
|
|
|
public sealed class TakeAmmoEvent : EntityEventArgs
|
|
|
|
|
{
|
2023-03-11 20:08:22 +11:00
|
|
|
public readonly EntityUid? User;
|
2022-06-01 19:59:58 +10:00
|
|
|
public readonly int Shots;
|
2023-03-11 20:08:22 +11:00
|
|
|
public List<(EntityUid? Entity, IShootable Shootable)> Ammo;
|
2022-06-01 19:59:58 +10:00
|
|
|
|
2023-08-12 22:58:07 -07:00
|
|
|
/// <summary>
|
|
|
|
|
/// If no ammo returned what is the reason for it?
|
|
|
|
|
/// </summary>
|
|
|
|
|
public string? Reason;
|
|
|
|
|
|
2022-06-01 19:59:58 +10:00
|
|
|
/// <summary>
|
|
|
|
|
/// Coordinates to spawn the ammo at.
|
|
|
|
|
/// </summary>
|
|
|
|
|
public EntityCoordinates Coordinates;
|
|
|
|
|
|
2023-03-11 20:08:22 +11:00
|
|
|
public TakeAmmoEvent(int shots, List<(EntityUid? Entity, IShootable Shootable)> ammo, EntityCoordinates coordinates, EntityUid? user)
|
2022-06-01 19:59:58 +10:00
|
|
|
{
|
|
|
|
|
Shots = shots;
|
|
|
|
|
Ammo = ammo;
|
|
|
|
|
Coordinates = coordinates;
|
|
|
|
|
User = user;
|
|
|
|
|
}
|
|
|
|
|
}
|