Skip to content

OnGrowableGathered

Usage

  • No return behavior

Example Autogenerated

csharp
private void OnGrowableGathered( GrowableEntity instance, Item item, BasePlayer player )
{
    Puts( "OnGrowableGathered works!" );
}

Location

  • GrowableEntity::GiveFruit(BasePlayer player, int amount, bool applyCondition, bool eat)
csharp
//---
			return;
		}
	}
	if (player != null)
	{
		Interface.CallHook("OnGrowableGathered", this, item, player);
		Facepunch.Rust.Analytics.Azure.OnGatherItem(item.info.shortname, item.amount, this, player, null);
		player.GiveItem(item, BaseEntity.GiveItemReason.ResourceHarvested);
		return;
	}
	item.Drop(base.transform.position + Vector3.up * 0.5f, Vector3.up * 1f, default(Quaternion));
//---

Released under the MIT License.