OnItemRecycle
Usage
- Return a non-null value to override default behavior
Example Autogenerated
csharp
private void OnItemRecycle( Item slot, Recycler instance )
{
Puts( "OnItemRecycle works!" );
}
csharp
private void OnItemRecycle( )
{
Puts( "OnItemRecycle works!" );
}
Location
- Recycler::RecycleThink()
- Recycler::RecycleThink()
csharp
//---
for (int i = 0; i < 6; i++)
{
Item slot = base.inventory.GetSlot(i);
if (this.CanBeRecycled(slot))
{
if (Interface.CallHook("OnItemRecycle", slot, this) != null)
{
return;
}
if (slot.hasCondition)
{
//---
csharp
//---
for (int i = 0; i < 6; i++)
{
Item slot = base.inventory.GetSlot(i);
if (this.CanBeRecycled(slot))
{
if (Interface.CallHook("OnItemRecycle", slot, this) != null)
{
if (!base.HasRecyclable())
{
base.StopRecycling();
return;
//---