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:
@ -4,10 +4,10 @@ local a = farming.recipe_items
|
||||
|
||||
-- vanilla
|
||||
minetest.register_craftitem("farming:vanilla", {
|
||||
description = S("Vanilla") .. " (♥1)",
|
||||
description = S("Vanilla"),
|
||||
inventory_image = "farming_vanilla.png",
|
||||
groups = {
|
||||
compostability = 48, seed = 2, food_vanilla = 1, flammable = 2, eatable = 1
|
||||
compostability = 48, seed = 2, food_vanilla = 1, flammable = 2
|
||||
},
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
return farming.place_seed(itemstack, placer, pointed_thing, "farming:vanilla_1")
|
||||
@ -15,6 +15,8 @@ minetest.register_craftitem("farming:vanilla", {
|
||||
on_use = minetest.item_eat(1)
|
||||
})
|
||||
|
||||
farming.add_eatable("farming:vanilla", 1)
|
||||
|
||||
-- crop definition
|
||||
local def = {
|
||||
drawtype = "plantlike",
|
||||
|
Reference in New Issue
Block a user