OnMaxStackable
Usage
- Return a int value to override default behavior
Example Autogenerated
csharp
private int? OnMaxStackable( Item instance )
{
Puts( "OnMaxStackable works!" );
return null;
}Location
- Item::MaxStackable()
csharp
//---
int num = this.info.stackable;
if (this.parent != null && this.parent.maxStackSize > 0)
{
num = Mathf.Min(this.parent.maxStackSize, num);
}
object returnvar = Interface.CallHook("OnMaxStackable", this);
if (returnvar is int)
{
return (int)returnvar;
}
return num;
//---