Skip to content

CanRecycle

Usage

  • Return a non-null value to override default behavior

Example Autogenerated

csharp
private void CanRecycle( Recycler instance, Item slot )
{
    Puts( "CanRecycle works!" );
}

Location

  • Recycler::HasRecyclable()
csharp
//---
	for (int i = 0; i < 6; i++)
	{
		Item slot = base.inventory.GetSlot(i);
		if (slot != null)
		{
			object returnvar = Interface.CallHook("CanRecycle", this, slot);
			if (returnvar is bool)
			{
				return (bool)returnvar;
			}
			if (slot.info.Blueprint != null)
//---

Released under the MIT License.