1
0
mirror of https://codeberg.org/tenplus1/farming.git synced 2025-06-29 23:01:00 +02:00

add helper function to add {eatable}

This commit is contained in:
tenplus1
2024-07-26 16:30:53 +01:00
parent 648bae7517
commit 75e3f9fb42
41 changed files with 387 additions and 205 deletions

View File

@ -65,17 +65,19 @@ end
-- grapes
minetest.register_craftitem("farming:grapes", {
description = S("Grapes") .. " (♥2)",
description = S("Grapes"),
inventory_image = "farming_grapes.png",
on_use = minetest.item_eat(2),
groups = {
compostability = 48, seed = 2, food_grapes = 1, flammable = 3, eatable = 2
compostability = 48, seed = 2, food_grapes = 1, flammable = 3
},
on_place = function(itemstack, placer, pointed_thing)
return place_grapes(itemstack, placer, pointed_thing, "farming:grapes_1")
end
})
farming.add_eatable("farming:grapes", 2)
-- grapes can be used for violet dye
minetest.register_craft({
output = a.dye_violet,