CanVendingAcceptItem
Usage
- Return a bool value to override default behavior
Example Autogenerated
csharp
private bool? CanVendingAcceptItem( VendingMachine instance, Item item, int targetSlot )
{
Puts( "CanVendingAcceptItem works!" );
return null;
}Location
- VendingMachine::CanAcceptItem(Item item, int targetSlot)
csharp
public bool CanAcceptItem(Item item, int targetSlot)
{
object obj = Interface.CallHook("CanVendingAcceptItem", this, item, targetSlot);
if (obj is bool)
{
return (bool)obj;
}
BasePlayer basePlayer = item.GetRootContainer()?.GetOwnerPlayer();
//---