API ReferenceSandbox
BaseAmmoPickupclass
A world pickup that tops up the collector's reserve ammo pool instead of taking a slot. Give it an `Sandbox.BaseAmmoResource` and an amount; picking it up donates into the pool (`Sandbox.BaseInventoryComponent.GiveAmmo(Sandbox.BaseAmmoResource,System.Int32)`) and the pickup is consumed. When the pool is full it refuses - no prompt, and Touch leaves it lying there.
Constructors1
Showing 1 constructors
public BaseAmmoPickup()
No results match this filter.
Methods2
Showing 2 methods
protected virtual bool OnAdding(Sandbox.BaseInventoryComponent inventory)
| Parameter | Type | Description |
|---|---|---|
| inventory | BaseInventoryComponent | — |
Returns:
bool—protected virtual bool OnCanPickup(Sandbox.BaseInventoryComponent inventory)
No point offering ammo the collector can't carry.
| Parameter | Type | Description |
|---|---|---|
| inventory | BaseInventoryComponent | — |
Returns:
bool—No results match this filter.
Properties2
Showing 2 properties
public Sandbox.BaseAmmoResource Sandbox.BaseAmmoPickup.AmmoType { get; set; }
The reserve ammo type this grants.
public int Sandbox.BaseAmmoPickup.Amount { get; set; }
Rounds granted on pickup.
Returns:
int—No results match this filter.