PyuTestCore.make_food = function (nsname, desc, wield_image, health_fill, extra_code)
  local code = extra_code or function()end

  PyuTestCore.make_item(nsname, desc, {}, wield_image, {
      on_use = function (itemstack, user, pt)
	if user == nil then return end
	minetest.sound_play({name = "eat", gain = 1}, {pos = user:get_pos(), start_time = 1.2})
	minetest.do_item_eat(health_fill, "", itemstack, user, pt)
	code()
      end
  })
end

PyuTestCore.make_food("pyutest_core:apple", "Apple", "pyutest-apple.png", 6)
PyuTestCore.make_food("pyutest_core:bread", "Bread", "pyutest-bread.png", 4)
PyuTestCore.make_food("pyutest_core:water_bottle", "Water Bottle", "pyutest-water-bottle.png", 0)
