Added Peas, Bowl, Pea Soup

This commit is contained in:
TenPlus1 2018-03-21 10:51:12 +00:00
parent 3dd1c5280e
commit 719e3b1d74
16 changed files with 115 additions and 3 deletions

View File

@ -13,6 +13,7 @@ This mod works by adding your new plant to the {growing=1} group and numbering t
Changelog:
1.32 - Added Pea plant (textures by Andrey01) - also added Wooden Bowl and Pea Soup crafts
1.31 - Added Pineapple which can be found growing in savannah areas (place pineapple in crafting to obtain 5x rings to eat and a top for re-planting), also Salt which is made from cooking a bucket of water, added food groups so it's more compatible with Ruben's food mods.
1.30 - Added Garlic, Pepper and Onions thanks to Grizzly Adam for sharing textures
1.29 - Updating functions so requires Minetest 0.4.16 and above to run

View File

@ -16,7 +16,7 @@ minetest.register_craftitem("farming:chili_pepper", {
minetest.register_craftitem("farming:chili_bowl", {
description = S("Bowl of Chili"),
inventory_image = "farming_chili_bowl.png",
on_use = minetest.item_eat(8),
on_use = minetest.item_eat(8, "farming:bowl"),
})
minetest.register_craft({
@ -24,7 +24,7 @@ minetest.register_craft({
output = "farming:chili_bowl",
recipe = {
"group:food_chili_pepper", "group:food_barley",
"group:food_tomato", "group:food_beans"
"group:food_tomato", "group:food_beans", "group:food_bowl"
}
})

View File

@ -28,6 +28,7 @@ farming.onion = true
farming.garlic = true
farming.pepper = true
farming.pineapple = true
farming.peas = true
farming.donuts = true
-- rarety of crops on map, default is 0.001 (higher number = more crops)

View File

@ -7,7 +7,7 @@
farming = {}
farming.mod = "redo"
farming.version = "1.31"
farming.version = "1.32"
farming.path = minetest.get_modpath("farming")
farming.select = {
type = "fixed",
@ -598,6 +598,7 @@ farming.garlic = true
farming.onion = true
farming.pepper = true
farming.pineapple = true
farming.peas = true
farming.donuts = true
farming.rarety = 0.001 -- 0.006
@ -624,6 +625,7 @@ end
dofile(farming.path.."/soil.lua")
dofile(farming.path.."/hoes.lua")
dofile(farming.path.."/grass.lua")
dofile(farming.path.."/utensils.lua")
-- default crops
dofile(farming.path.."/wheat.lua")
@ -653,6 +655,7 @@ if farming.garlic then dofile(farming.path.."/garlic.lua") end
if farming.onion then dofile(farming.path.."/onion.lua") end
if farming.pepper then dofile(farming.path.."/pepper.lua") end
if farming.pineapple then dofile(farming.path.."/pineapple.lua") end
if farming.peas then dofile(farming.path.."/pea.lua") end
dofile(farming.path.."/mapgen.lua")
dofile(farming.path.."/compatibility.lua") -- Farming Plus compatibility

View File

@ -39,6 +39,7 @@ register_plant("beanbush", 18, 35, "", -1, farming.beans)
register_plant("grapebush", 25, 45, "", -1, farming.grapes)
register_plant("onion_5", 5, 22, "", -1, farming.onion)
register_plant("garlic_5", 3, 30, "group:tree", 1, farming.garlic)
register_plant("pea_5", 25, 50, "", -1, farming.peas)
if minetest.get_mapgen_setting("mg_name") == "v6" then

89
pea.lua Normal file
View File

@ -0,0 +1,89 @@
local S = farming.intllib
-- Textures for Pea crop and Peas were done by Andrey01
-- pea pod
minetest.register_craftitem("farming:pea_pod", {
description = S("Pea Pod"),
inventory_image = "farming_pea_pod.png",
groups = {food_pea_pod = 1, flammable = 2},
on_place = function(itemstack, placer, pointed_thing)
return farming.place_seed(itemstack, placer, pointed_thing, "farming:pea_1")
end
})
minetest.register_craftitem("farming:peas", {
description = S("Peas"),
inventory_image = "farming_pea_peas.png",
groups = {food_peas = 1, flammable = 2},
on_use = minetest.item_eat(1)
})
minetest.register_craft({
type = "shapeless",
output = "farming:peas",
recipe = {"farming:pea_pod"}
})
-- pea soup
minetest.register_craftitem("farming:pea_soup", {
description = S("Pea Soup"),
inventory_image = "farming_pea_soup.png",
groups = {food_peas = 1, flammable = 2},
on_use = minetest.item_eat(4, "farming:bowl"),
})
minetest.register_craft({
type = "shapeless",
output = "farming:pea_soup",
recipe = {"group:food_peas", "group:food_peas", "group:food_bowl"}
})
local crop_def = {
drawtype = "plantlike",
tiles = {"farming_pea_1.png"},
paramtype = "light",
paramtype2 = "meshoptions",
place_param2 = 3,
sunlight_propagates = true,
waving = 1,
walkable = false,
buildable_to = true,
drop = "",
selection_box = farming.select,
groups = {
snappy = 3, flammable = 2, flora = 1, attached_node = 1,
not_in_creative_inventory = 1, growing = 1
},
sounds = default.node_sound_leaves_defaults()
}
-- stage 1
minetest.register_node("farming:pea_1", table.copy(crop_def))
-- stage 2
crop_def.tiles = {"farming_pea_2.png"}
minetest.register_node("farming:pea_2", table.copy(crop_def))
-- stage 3
crop_def.tiles = {"farming_pea_3.png"}
minetest.register_node("farming:pea_3", table.copy(crop_def))
-- stage 4
crop_def.tiles = {"farming_pea_4.png"}
minetest.register_node("farming:pea_4", table.copy(crop_def))
-- stage 5
crop_def.tiles = {"farming_pea_5.png"}
crop_def.groups.growing = 0
crop_def.drop = {
max_items = 5, items = {
{items = {'farming:pea_pod'}, rarity = 1},
{items = {'farming:pea_pod'}, rarity = 2},
{items = {'farming:pea_pod'}, rarity = 3},
{items = {'farming:pea_pod'}, rarity = 4},
{items = {'farming:pea_pod'}, rarity = 5},
}
}
minetest.register_node("farming:pea_5", table.copy(crop_def))

BIN
textures/farming_bowl.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 145 B

BIN
textures/farming_pea_1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 203 B

BIN
textures/farming_pea_2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 215 B

BIN
textures/farming_pea_3.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 431 B

BIN
textures/farming_pea_4.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 528 B

BIN
textures/farming_pea_5.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 705 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 659 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 597 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 161 B

17
utensils.lua Normal file
View File

@ -0,0 +1,17 @@
local S = farming.intllib
-- wooden bowl
minetest.register_craftitem("farming:bowl", {
description = S("Wooden Bowl"),
inventory_image = "farming_bowl.png",
groups = {food_bowl = 1, flammable = 2},
})
minetest.register_craft({
output = "farming:bowl 4",
recipe = {
{"group:wood", "", "group:wood"},
{"", "group:wood", ""},
}
})