Skip to content

OnQuarryGather ​

Usage ​

  • Return a non-null value to override default behavior

Example Autogenerated ​

csharp
private object OnQuarryGather( MiningQuarry instance, Item item )
{
    Puts( "OnQuarryGather works!" );
    return null;
}

Location ​

  • MiningQuarry::ProcessResources()
csharp
//---
		if (num2 != num3)
		{
			int iAmount = BaseGameMode.ScaleGatherAmount(num3 - num2);
			Item item = ItemManager.Create(resource.type, iAmount, 0uL, isServerSide: true, 0uL);
			Facepunch.Rust.Analytics.Azure.OnQuarryItem(Facepunch.Rust.Analytics.Azure.ResourceMode.Produced, item.info.shortname, item.amount, this);
			if (Interface.CallHook("OnQuarryGather", this, item) != null)
			{
				item.Remove();
			}
			else if (!item.MoveToContainer(hopperPrefab.instance.GetComponent<StorageContainer>().inventory))
			{
//---

Released under the MIT License.