Skip to content

OnCollectiblePickedup

Usage

  • No return behavior

Example Autogenerated

csharp
private void OnCollectiblePickedup( CollectibleEntity instance, BasePlayer reciever, Item item )
{
    Puts( "OnCollectiblePickedup works!" );
}

Location

  • CollectibleEntity::DoPickup(BasePlayer reciever, bool eat)
csharp
//---
			}
		}
		if ((bool)reciever)
		{
			Facepunch.Rust.Analytics.Azure.OnGatherItem(item.info.shortname, item.amount, this, reciever);
			Interface.CallHook("OnCollectiblePickedup", this, reciever, item);
			reciever.GiveItem(item, GiveItemReason.ResourceHarvested, GiveItemOptions.BackpackOverflow);
		}
		else
		{
			item.Drop(base.transform.position + Vector3.up * 0.5f, Vector3.up);
//---

Released under the MIT License.