Add lettuce and blackberries with recipes (thanks OgelGames)

This commit is contained in:
tenplus1 2020-12-10 15:37:44 +00:00
parent 0e108c4b2a
commit 45b5a073e0
21 changed files with 201 additions and 2 deletions

View File

@ -13,7 +13,8 @@ This mod works by adding your new plant to the {growing=1} group and numbering t
### Changelog:
- 1.45 - Dirt and Hoes are more in line with default by using dry/wet/base, added cactus juice, added pasta, spaghetti, cabbage, korean bibimbap, code tidy, minmax light setting
- 1.46 - Added min/max default light settings, added lettuce and blackberries with food items (thanks OgelGames)
- 1.45 - Dirt and Hoes are more in line with default by using dry/wet/base, added cactus juice, added pasta, spaghetti, cabbage, korean bibimbap, code tidy
options, onion soup added (thanks edcrypt), Added apple pie, added wild cotton to savanna
- 1.44 - Added 'farming_stage_length' in mod settings for speed of crop growth, also thanks to TheDarkTiger for translation updates
- 1.43 - Scythe works on use instead of right-click, added seed=1 groups to actual seeds and seed=2 group for plantable food items.

62
crops/blackberry.lua Normal file
View File

@ -0,0 +1,62 @@
local S = farming.intllib
-- blackberries
minetest.register_craftitem("farming:blackberry", {
description = S("Blackberries"),
inventory_image = "farming_blackberry.png",
groups = {seed = 2, food_blackberries = 1, food_blackberry = 1,
food_berry = 1, flammable = 2},
on_place = function(itemstack, placer, pointed_thing)
return farming.place_seed(itemstack, placer, pointed_thing, "farming:blackberry_1")
end,
on_use = minetest.item_eat(1),
})
local def = {
drawtype = "plantlike",
tiles = {"farming_blackberry_1.png"},
paramtype = "light",
sunlight_propagates = true,
walkable = false,
buildable_to = true,
drop = "",
selection_box = farming.select,
groups = {
snappy = 3, flammable = 2, plant = 1, attached_node = 1,
not_in_creative_inventory = 1, growing = 1
},
sounds = default.node_sound_leaves_defaults()
}
-- stage 1
minetest.register_node("farming:blackberry_1", table.copy(def))
-- stage 2
def.tiles = {"farming_blackberry_2.png"}
minetest.register_node("farming:blackberry_2", table.copy(def))
-- stage 3
def.tiles = {"farming_blackberry_3.png"}
minetest.register_node("farming:blackberry_3", table.copy(def))
-- stage 4
def.tiles = {"farming_blackberry_4.png"}
def.groups.growing = 0
def.drop = {
items = {
{items = {'farming:blackberry 2'}, rarity = 1},
{items = {'farming:blackberry'}, rarity = 2},
{items = {'farming:blackberry'}, rarity = 3},
}
}
minetest.register_node("farming:blackberry_4", table.copy(def))
-- add to registered_plants
farming.registered_plants["farming:blackberry"] = {
crop = "farming:blackberry",
seed = "farming:blackberry",
minlight = farming.min_light,
maxlight = farming.max_light,
steps = 4
}

63
crops/lettuce.lua Normal file
View File

@ -0,0 +1,63 @@
local S = farming.intllib
-- lettuce
minetest.register_craftitem("farming:lettuce", {
description = S("Lettuce"),
inventory_image = "farming_lettuce.png",
groups = {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")
end,
on_use = minetest.item_eat(2),
})
local def = {
drawtype = "plantlike",
tiles = {"farming_lettuce_1.png"},
paramtype = "light",
sunlight_propagates = true,
walkable = false,
buildable_to = true,
drop = "",
selection_box = farming.select,
groups = {
snappy = 3, flammable = 2, plant = 1, attached_node = 1,
not_in_creative_inventory = 1, growing = 1
},
sounds = default.node_sound_leaves_defaults()
}
-- stage 1
minetest.register_node("farming:lettuce_1", table.copy(def))
-- stage 2
def.tiles = {"farming_lettuce_2.png"}
minetest.register_node("farming:lettuce_2", table.copy(def))
-- stage 3
def.tiles = {"farming_lettuce_3.png"}
minetest.register_node("farming:lettuce_3", table.copy(def))
-- stage 4
def.tiles = {"farming_lettuce_4.png"}
minetest.register_node("farming:lettuce_4", table.copy(def))
-- stage 5
def.tiles = {"farming_lettuce_5.png"}
def.groups.growing = 0
def.drop = {
items = {
{items = {'farming:lettuce 2'}, rarity = 1},
{items = {'farming:lettuce 2'}, rarity = 2},
}
}
minetest.register_node("farming:lettuce_5", table.copy(def))
-- add to registered_plants
farming.registered_plants["farming:lettuce"] = {
crop = "farming:lettuce",
seed = "farming:lettuce",
minlight = farming.min_light,
maxlight = farming.max_light,
steps = 5
}

View File

@ -31,6 +31,8 @@ farming.peas = 0.001
farming.beetroot = 0.001
farming.mint = 0.005
farming.cabbage = 0.001
farming.blackberry = 0.002
farming.lettuce = 0.001
farming.grains = true -- true or false only
-- default rarety of crops on map (higher number = more crops)

View File

@ -373,3 +373,68 @@ minetest.register_craft({
replacements = {{"group:food_skillet", "farming:skillet"}}
})
end
-- Burger
minetest.register_craftitem("farming:burger", {
description = S("Burger"),
inventory_image = "farming_burger.png",
on_use = minetest.item_eat(16),
})
if minetest.get_modpath("mobs_animal") or minetest.get_modpath("xanadu")then
minetest.register_craft({
type = "shapeless",
output = "farming:burger",
recipe = {
"farming:bread", "group:food_meat", "group:food_cheese",
"group:food_tomato", "group:food_cucumber", "group:food_onion",
"group:food_lettuce"
}
})
else
minetest.register_craft({
type = "shapeless",
output = "farming:burger",
recipe = {
"farming:bread", "group:food_mushroom", "group:food_tomato",
"group:food_cucumber", "group:food_onion", "group:food_lettuce"
}
})
end
-- Salad
minetest.register_craftitem("farming:salad", {
description = S("Salad"),
inventory_image = "farming_salad.png",
on_use = minetest.item_eat(8, "farming:bowl")
})
minetest.register_craft({
output = "farming:salad",
type = "shapeless",
recipe = {
"group:food_bowl", "group:food_tomato", "group:food_cucumber",
"group:food_lettuce", "group:food_oil"
},
})
-- Triple Berry Smoothie
minetest.register_craftitem("farming:smoothie_berry", {
description = S("Triple Berry Smoothie"),
inventory_image = "farming_berry_smoothie.png",
on_use = minetest.item_eat(6, "vessels:drinking_glass"),
groups = {vessel = 1, drink = 1}
})
minetest.register_craft({
output = "farming:smoothie_berry",
type = "shapeless",
recipe = {
"group:food_raspberries", "group:food_blackberries",
"group:food_strawberry", "group:food_banana",
"vessels:drinking_glass"
}
})

View File

@ -7,7 +7,7 @@
farming = {
mod = "redo",
version = "20201209",
version = "20201210",
path = minetest.get_modpath("farming"),
select = {
type = "fixed",
@ -629,6 +629,8 @@ farming.peas = 0.001
farming.beetroot = 0.001
farming.mint = 0.005
farming.cabbage = 0.001
farming.blackberry = 0.002
farming.lettuce = 0.001
farming.grains = true
farming.rarety = 0.002
@ -695,6 +697,8 @@ ddoo("chili.lua", farming.chili)
ddoo("ryeoatrice.lua", farming.grains)
ddoo("mint.lua", farming.mint)
ddoo("cabbage.lua", farming.cabbage)
ddoo("blackberry.lua", farming.blackberry)
ddoo("lettuce.lua", farming.lettuce)
dofile(farming.path .. "/food.lua")
dofile(farming.path .. "/mapgen.lua")

View File

@ -50,6 +50,8 @@ register_plant("beetroot_5", 1, 15, nil, "", -1, farming.beetroot)
register_plant("mint_4", 1, 75, {"default:dirt_with_grass",
"default:dirt_with_coniferous_litter"}, "group:water", 1, farming.mint)
register_plant("cabbage_6", 2, 10, nil, "", -1, farming.cabbage)
register_plant("lettuce_5", 5, 30, nil, "", -1, farming.lettuce)
register_plant("blackberry_4", 3, 10, nil, "", -1, farming.blackberry)
if minetest.get_mapgen_setting("mg_name") == "v6" then

Binary file not shown.

After

Width:  |  Height:  |  Size: 215 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 223 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 121 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 337 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 324 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 344 B

BIN
textures/farming_burger.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 480 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 539 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 110 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 152 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 186 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 220 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 248 B

BIN
textures/farming_salad.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 204 B