1
0
mirror of https://codeberg.org/tenplus1/farming.git synced 2024-11-05 09:50:36 +01:00

add red and yellow peppers (thanks Felfa)

This commit is contained in:
tenplus1 2020-12-13 09:21:06 +00:00
parent 66acbf5458
commit f2ab135c6b
5 changed files with 43 additions and 5 deletions

View File

@ -19,16 +19,32 @@ minetest.register_craftitem("farming:peppercorn", {
-- green pepper
minetest.register_craftitem("farming:pepper", {
description = S("Pepper"),
description = S("Green Pepper"),
inventory_image = "crops_pepper.png",
on_use = minetest.item_eat(2),
groups = {food_pepper = 1, flammable = 3}
})
-- yellow pepper
minetest.register_craftitem("farming:pepper_yellow", {
description = S("Yellow Pepper"),
inventory_image = "crops_pepper_yellow.png",
on_use = minetest.item_eat(3),
groups = {food_pepper = 1, flammable = 3},
})
-- red pepper
minetest.register_craftitem("farming:pepper_red", {
description = S("Red Pepper"),
inventory_image = "crops_pepper_red.png",
on_use = minetest.item_eat(4),
groups = {food_pepper = 1, flammable = 3},
})
minetest.register_craft({
type = "shapeless",
output = "farming:peppercorn",
recipe = {"farming:pepper"}
recipe = {"group:food_pepper"}
})
-- ground pepper
@ -93,11 +109,10 @@ minetest.register_node("farming:pepper_3", table.copy(def))
def.tiles = {"crops_pepper_plant_4.png"}
minetest.register_node("farming:pepper_4", table.copy(def))
-- stage 5
-- stage 5 (green pepper)
def.tiles = {"crops_pepper_plant_5.png"}
def.groups.growing = 0
def.drop = {
items = {
max_items = 2, items = {
{items = {"farming:pepper 2"}, rarity = 1},
{items = {"farming:pepper"}, rarity = 2},
{items = {"farming:pepper"}, rarity = 3}
@ -105,6 +120,29 @@ def.drop = {
}
minetest.register_node("farming:pepper_5", table.copy(def))
-- stage 6 (yellow pepper)
def.tiles = {"crops_pepper_plant_6.png"}
def.drop = {
max_items = 2, items = {
{items = {'farming:pepper_yellow 2'}, rarity = 1},
{items = {'farming:pepper_yellow'}, rarity = 2},
{items = {'farming:pepper_yellow'}, rarity = 3},
}
}
minetest.register_node("farming:pepper_6", table.copy(def))
-- stage 7 (red pepper)
def.tiles = {"crops_pepper_plant_7.png"}
def.groups.growing = 0
def.drop = {
max_items = 2, items = {
{items = {'farming:pepper_red 2'}, rarity = 1},
{items = {'farming:pepper_red'}, rarity = 2},
{items = {'farming:pepper_red'}, rarity = 3},
}
}
minetest.register_node("farming:pepper_7", table.copy(def))
-- add to registered_plants
farming.registered_plants["farming:pepper"] = {
crop = "farming:pepper",

Binary file not shown.

After

Width:  |  Height:  |  Size: 423 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 442 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 339 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 353 B