Skip to content

Commit

Permalink
uwu (#5)
Browse files Browse the repository at this point in the history
  • Loading branch information
VALERA771 authored Aug 1, 2024
1 parent 7262f06 commit c9654ee
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions EXILED/Exiled.API/Features/Player.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2319,6 +2319,16 @@ public void Broadcast(ushort duration, string message, global::Broadcast.Broadca
public void AddAmmo(AmmoType ammoType, ushort amount) =>
Inventory.ServerAddAmmo(ammoType.GetItemType(), amount);

/// <summary>
/// Adds the amount of a specified <see cref="AmmoType">ammo type</see> to player's inventory.
/// </summary>
/// <param name="ammoBag">A dictionary of <see cref="AmmoType">ammo types</see> that will be added.</param>
public void AddAmmo(Dictionary<AmmoType, ushort> ammoBag)
{
foreach (KeyValuePair<AmmoType, ushort> kvp in ammoBag)
AddAmmo(kvp.Key, kvp.Value);
}

/// <summary>
/// Adds the amount of a weapon's <see cref="AmmoType">ammo type</see> to the player's inventory.
/// </summary>
Expand All @@ -2338,6 +2348,16 @@ public void SetAmmo(AmmoType ammoType, ushort amount)
Inventory.ServerSetAmmo(itemType, amount);
}

/// <summary>
/// Sets the amount of a specified <see cref="AmmoType">ammo type</see> to player's inventory.
/// </summary>
/// <param name="ammoBag">A dictionary of <see cref="AmmoType">ammo types</see> that will be added.</param>
public void SetAmmo(Dictionary<AmmoType, ushort> ammoBag)
{
foreach (KeyValuePair<AmmoType, ushort> kvp in ammoBag)
SetAmmo(kvp.Key, kvp.Value);
}

/// <summary>
/// Gets the ammo count of a specified <see cref="AmmoType">ammo type</see> in a player's inventory.
/// </summary>
Expand Down

0 comments on commit c9654ee

Please sign in to comment.