1
0
mirror of https://codeberg.org/tenplus1/farming.git synced 2025-07-02 16:20:42 +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

@ -3,10 +3,10 @@ local S = farming.translate
-- lettuce
minetest.register_craftitem("farming:lettuce", {
description = S("Lettuce") .. " (♥2)",
description = S("Lettuce"),
inventory_image = "farming_lettuce.png",
groups = {
compostability = 48, seed = 2, food_lettuce = 1, flammable = 2, eatable = 2
compostability = 48, seed = 2, food_lettuce = 1, flammable = 2
},
on_place = function(itemstack, placer, pointed_thing)
return farming.place_seed(itemstack, placer, pointed_thing, "farming:lettuce_1")
@ -14,6 +14,8 @@ minetest.register_craftitem("farming:lettuce", {
on_use = minetest.item_eat(2)
})
farming.add_eatable("farming:lettuce", 2)
local def = {
drawtype = "plantlike",
tiles = {"farming_lettuce_1.png"},