CanLivestockAnimalRefuseTarget
Usage
- Return a bool value to override default behavior
Example Autogenerated
csharp
private bool? CanLivestockAnimalRefuseTarget( Rust.Ai.Gen2.LivestockAnimal instance, BasePlayer basePlayer )
{
Puts( "CanLivestockAnimalRefuseTarget works!" );
return null;
}Location
- Rust.Ai.Gen2.LivestockAnimal::RefusesToTarget(BaseEntity entity)
csharp
//---
{
if (!(entity is BasePlayer basePlayer))
{
return !IsSoreAt(entity);
}
object obj = Interface.CallHook("CanLivestockAnimalRefuseTarget", this, basePlayer);
if (obj is bool)
{
return (bool)obj;
}
if (!IsMale || !IsAdult())
//---