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