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,11 +4,11 @@ local a = farming.recipe_items
|
||||
|
||||
-- blueberries
|
||||
minetest.register_craftitem("farming:blueberries", {
|
||||
description = S("Wild Blueberries") .. " (♥1)",
|
||||
description = S("Wild Blueberries"),
|
||||
inventory_image = "farming_blueberries.png",
|
||||
groups = {
|
||||
compostability = 48,seed = 2, food_blueberries = 1, food_blueberry = 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:blueberry_1")
|
||||
@ -16,14 +16,18 @@ minetest.register_craftitem("farming:blueberries", {
|
||||
on_use = minetest.item_eat(1)
|
||||
})
|
||||
|
||||
farming.add_eatable("farming:blueberries", 1)
|
||||
|
||||
-- blueberry muffin (thanks to sosogirl123 @ deviantart.com for muffin image)
|
||||
minetest.register_craftitem("farming:muffin_blueberry", {
|
||||
description = S("Blueberry Muffin") .. " (♥2)",
|
||||
description = S("Blueberry Muffin"),
|
||||
inventory_image = "farming_blueberry_muffin.png",
|
||||
on_use = minetest.item_eat(2),
|
||||
groups = {compostability = 65, eatable = 2}
|
||||
groups = {compostability = 65}
|
||||
})
|
||||
|
||||
farming.add_eatable("farming:muffin_blueberry", 2)
|
||||
|
||||
minetest.register_craft({
|
||||
output = "farming:muffin_blueberry 2",
|
||||
recipe = {
|
||||
@ -33,12 +37,14 @@ minetest.register_craft({
|
||||
|
||||
-- Blueberry Pie
|
||||
minetest.register_craftitem("farming:blueberry_pie", {
|
||||
description = S("Blueberry Pie") .. " (♥6)",
|
||||
description = S("Blueberry Pie"),
|
||||
inventory_image = "farming_blueberry_pie.png",
|
||||
on_use = minetest.item_eat(6),
|
||||
groups = {compostability = 75, eatable = 6}
|
||||
groups = {compostability = 75}
|
||||
})
|
||||
|
||||
farming.add_eatable("farming:blueberry_pie", 6)
|
||||
|
||||
minetest.register_craft({
|
||||
output = "farming:blueberry_pie",
|
||||
recipe = {
|
||||
|
Reference in New Issue
Block a user