Files
UltimateFishing/Assets/Scripts/Assembly-CSharp/vp_WeaponPickup.cs
2026-02-21 16:45:37 +08:00

23 lines
410 B
C#

public class vp_WeaponPickup : vp_Pickup
{
public int AmmoIncluded;
protected override bool TryGive(vp_FPPlayerEventHandler player)
{
if (player.Dead.Active)
{
return false;
}
if (!base.TryGive(player))
{
return false;
}
player.SetWeaponByName.Try(InventoryName);
if (AmmoIncluded > 0)
{
player.AddAmmo.Try(new object[2] { InventoryName, AmmoIncluded });
}
return true;
}
}