mirror of
https://codeberg.org/tenplus1/farming.git
synced 2025-06-29 14:50:52 +02:00
add helper function to add {eatable}
This commit is contained in:
@ -4,11 +4,11 @@ local a = farming.recipe_items
|
||||
|
||||
-- raspberries
|
||||
minetest.register_craftitem("farming:raspberries", {
|
||||
description = S("Raspberries") .. " (♥1)",
|
||||
description = S("Raspberries"),
|
||||
inventory_image = "farming_raspberries.png",
|
||||
groups = {
|
||||
compostability = 48, seed = 2, food_raspberries = 1, food_raspberry = 1,
|
||||
food_berry = 1, flammable = 2, eatable = 1
|
||||
food_berry = 1, flammable = 2
|
||||
},
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
return farming.place_seed(itemstack, placer, pointed_thing, "farming:raspberry_1")
|
||||
@ -16,14 +16,18 @@ minetest.register_craftitem("farming:raspberries", {
|
||||
on_use = minetest.item_eat(1)
|
||||
})
|
||||
|
||||
farming.add_eatable("farming:raspberries", 1)
|
||||
|
||||
-- raspberry smoothie
|
||||
minetest.register_craftitem("farming:smoothie_raspberry", {
|
||||
description = S("Raspberry Smoothie") .. " (♥2)",
|
||||
description = S("Raspberry Smoothie"),
|
||||
inventory_image = "farming_raspberry_smoothie.png",
|
||||
on_use = minetest.item_eat(2, "vessels:drinking_glass"),
|
||||
groups = {vessel = 1, drink = 1, compostability = 65, eatable = 2}
|
||||
groups = {vessel = 1, drink = 1, compostability = 65}
|
||||
})
|
||||
|
||||
farming.add_eatable("farming:smoothie_raspberry", 2)
|
||||
|
||||
minetest.register_craft({
|
||||
output = "farming:smoothie_raspberry",
|
||||
recipe = {
|
||||
|
Reference in New Issue
Block a user