// Default behavior: Eat the entire piece of food and self-destruct.
int on_consume( int max ) {
   string m;
   int quant;
   
   debug("on_consume, max is " + max);

   quant = this_object()->query_quantity();
   if( !quant ) quant = 1;
   if( quant * max(this_object()->query_food_value(),
      this_object()->query_drink_value()) > max ) {
      quant = min( max / this_object()->query_food_value(),
         max / this_object()->query_drink_value() );
      debug("adjusted quant is " + quant);
      if( quant == 0 ) {
         msg("You are too full to eat that!");
         return 1;
      }
   }
   this_player()->add_food( this_object()->query_food_value() * quant );
   this_player()->add_drink( this_object()->query_drink_value() * quant );
   m = this_object()->query_use_msg();
   if( !m ) m = "~CACT~Name ~verbeat ~targ.~CDEF";
   else m = "~CACT" + m + "~CDEF";
   set_target(this_object());
   this_player()->msg_local( m );
   destruct( this_object() );
   return 1;
}
