Skip to content

OnItemRecycleAmount

Usage

  • Return TYPE to prevent default behavior

Example Autogenerated

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

Location

  • Recycler::RecycleThink()
csharp
//---
				int num2 = 1;
				if (slot.amount > 1)
				{
					num2 = Mathf.CeilToInt(Mathf.Min((float)slot.amount, (float)slot.MaxStackable() * 0.1f));
				}
				object returnvar = Interface.CallHook("OnItemRecycleAmount", slot, num2, this);
				if (returnvar is int)
				{
					num2 = (int)returnvar;
				}
				if (slot.info.Blueprint.scrapFromRecycle > 0)
//---

Released under the MIT License.