
local S = farming.intllib

--= A nice addition from Ademant's grain mod :)

-- Rye

farming.register_plant("farming:rye", {
	description = "Rye seed",
	paramtype2 = "meshoptions",
	inventory_image = "farming_rye_seed.png",
	steps = 8,
	place_param2 = 3,
})

minetest.override_item("farming:rye", {
	groups = {food_rye = 1, flammable = 4}
})

-- Oats

farming.register_plant("farming:oat", {
	description = "Oat seed",
	paramtype2 = "meshoptions",
	inventory_image = "farming_oat_seed.png",
	steps = 8,
	place_param2 = 3,
})

minetest.override_item("farming:oat", {
	groups = {food_oats = 1, flammable = 4}
})

-- Rice

farming.register_plant("farming:rice", {
	description = "Rice seed",
	paramtype2 = "meshoptions",
	inventory_image = "farming_rice_seed.png",
	steps = 8,
	place_param2 = 3,
})

minetest.override_item("farming:rice", {
	groups = {food_rice = 1, flammable = 4}
})

minetest.register_craftitem("farming:rice_bread", {
	description = "Rice Bread",
	inventory_image = "farming_rice_bread.png",
	on_use = minetest.item_eat(5),
	groups = {food_rice_bread = 1, flammable = 2},
})

minetest.register_craftitem("farming:rice_flour", {
	description = "Rice Flour",
	inventory_image = "farming_rice_flour.png",
	groups = {food_rice_flour = 1, flammable = 1},
})

-- Multigrain flour

minetest.register_craftitem("farming:flour_multigrain", {
	description = S("Multigrain Flour"),
	inventory_image = "farming_flour_multigrain.png",
	groups = {food_flour = 1, flammable = 1},
})

-- Multigrain bread

minetest.register_craftitem("farming:bread_multigrain", {
	description = S("Multigrain Bread"),
	inventory_image = "farming_bread_multigrain.png",
	on_use = minetest.item_eat(7),
	groups = {food_bread = 1, flammable = 2},
})
