engine/items/source/EdibleItemFilter.cpp
// Check to see if the item is edible
Check to see if the item is edible
Check to see if the item is edible
bool EdibleItemFilter::passes_filter(ItemPtr item) const
{
  if (item)
  {
    ItemType type = item->get_type();
    if (type == ItemType::ITEM_TYPE_FOOD || type == ItemType::ITEM_TYPE_PLANT)
    {
      return true;
    }
  }
  return false;
}
bool EdibleItemFilter :: passes_filter ( ItemPtr item ) const { if ( item ) { ItemType type = item -> get_type ( ) ; if ( type == ItemType :: ITEM_TYPE_FOOD || type == ItemType :: ITEM_TYPE_PLANT ) { return true ; } } return false ; }
Check to see if the item is edible
Check to see if the item is edible