Skip to content

OnAnimalDungProduce

Usage

  • Return a non-null value or bool to override default behavior

Example Autogenerated

csharp
private void OnAnimalDungProduce( BaseRidableAnimal instance )
{
    Puts( "OnAnimalDungProduce works!" );
}
csharp
private void OnAnimalDungProduce( RidableHorse2 instance )
{
    Puts( "OnAnimalDungProduce works!" );
}

Location

  • BaseRidableAnimal::DoDung()
  • RidableHorse2::DoDung()
csharp
private void DoDung()
{
	this.dungProduction -= 1f;
	if (Interface.CallHook("OnAnimalDungProduce", this) != null)
	{
		return;
	}
	ItemManager.Create(this.Dung, 1, 0uL, true).Drop(base.transform.position + -base.transform.forward + Vector3.up * 1.1f + UnityEngine.Random.insideUnitSphere * 0.1f, -base.transform.forward, default(Quaternion));
}
csharp
private void DoDung()
{
	this.dungProduction -= 1f;
	if (Interface.CallHook("OnAnimalDungProduce", this) != null)
	{
		return;
	}
	Quaternion rotation = Quaternion.Euler(UnityEngine.Random.Range(-180f, 180f), UnityEngine.Random.Range(-180f, 180f), UnityEngine.Random.Range(-180f, 180f));
	Vector3 vVelocity = new Vector3(UnityEngine.Random.Range(-0.5f, 0.5f), UnityEngine.Random.Range(-1f, -3f), UnityEngine.Random.Range(-0.5f, 0.5f));
//---

Released under the MIT License.