forked from mtcontrib/farming
added crop information to farming.registered_plants table
This commit is contained in:
parent
0d5fb9800a
commit
d7bc9b16fc
5
api.txt
5
api.txt
@ -11,6 +11,11 @@ The farming API allows you to easily register plants and hoes.
|
||||
|
||||
`farming.registered_plants[name] = definition`
|
||||
* Table of registered plants, indexed by plant name
|
||||
'crop' holds name of growing crop node minus _step-number at end
|
||||
'seed' has name of seed required to plant crop
|
||||
'minlight' min light level needed to grow
|
||||
'maxlight' max light level needed to grow
|
||||
'steps' number of steps crop has in growth cycle
|
||||
|
||||
### Hoe Definition
|
||||
|
||||
|
@ -103,3 +103,12 @@ crop_def.drop = {
|
||||
}
|
||||
}
|
||||
minetest.register_node("farming:barley_7", table.copy(crop_def))
|
||||
|
||||
-- add to registered_plants
|
||||
farming.registered_plants["farming:barley"] = {
|
||||
crop = "farming:barley",
|
||||
seed = "farming:seed_barley",
|
||||
minlight = 13,
|
||||
maxlight = 15,
|
||||
steps = 8
|
||||
}
|
||||
|
@ -224,6 +224,15 @@ crop_def.drop = {
|
||||
}
|
||||
minetest.register_node("farming:beanpole_5", table.copy(crop_def))
|
||||
|
||||
-- add to registered_plants
|
||||
farming.registered_plants["farming:beans"] = {
|
||||
crop = "farming:beanpole",
|
||||
seed = "farming:beans",
|
||||
minlight = 13,
|
||||
maxlight = 15,
|
||||
steps = 5
|
||||
}
|
||||
|
||||
-- wild green bean bush (this is what you find on the map)
|
||||
minetest.register_node("farming:beanbush", {
|
||||
drawtype = "plantlike",
|
||||
|
@ -83,3 +83,12 @@ crop_def.drop = {
|
||||
}
|
||||
}
|
||||
minetest.register_node("farming:beetroot_5", table.copy(crop_def))
|
||||
|
||||
-- add to registered_plants
|
||||
farming.registered_plants["farming:beetroot"] = {
|
||||
crop = "farming:beetroot",
|
||||
seed = "farming:beetroot",
|
||||
minlight = 13,
|
||||
maxlight = 15,
|
||||
steps = 5
|
||||
}
|
||||
|
@ -83,3 +83,12 @@ crop_def.drop = {
|
||||
}
|
||||
}
|
||||
minetest.register_node("farming:blueberry_4", table.copy(crop_def))
|
||||
|
||||
-- add to registered_plants
|
||||
farming.registered_plants["farming:blueberries"] = {
|
||||
crop = "farming:blueberry",
|
||||
seed = "farming:blueberries",
|
||||
minlight = 13,
|
||||
maxlight = 15,
|
||||
steps = 4
|
||||
}
|
||||
|
@ -94,3 +94,12 @@ crop_def.drop = {
|
||||
}
|
||||
}
|
||||
minetest.register_node("farming:carrot_8", table.copy(crop_def))
|
||||
|
||||
-- add to registered_plants
|
||||
farming.registered_plants["farming:carrot"] = {
|
||||
crop = "farming:carrot",
|
||||
seed = "farming:carrot",
|
||||
minlight = 13,
|
||||
maxlight = 15,
|
||||
steps = 8
|
||||
}
|
||||
|
@ -90,3 +90,12 @@ crop_def.drop = {
|
||||
}
|
||||
}
|
||||
minetest.register_node("farming:chili_8", table.copy(crop_def))
|
||||
|
||||
-- add to registered_plants
|
||||
farming.registered_plants["farming:chili_pepper"] = {
|
||||
crop = "farming:chili",
|
||||
seed = "farming:chili_pepper",
|
||||
minlight = 13,
|
||||
maxlight = 15,
|
||||
steps = 8
|
||||
}
|
||||
|
@ -165,6 +165,15 @@ crop_def.drop = {
|
||||
}
|
||||
minetest.register_node("farming:cocoa_4", table.copy(crop_def))
|
||||
|
||||
-- add to registered_plants
|
||||
farming.registered_plants["farming:cocoa_beans"] = {
|
||||
crop = "farming:cocoa",
|
||||
seed = "farming:cocoa_beans",
|
||||
minlight = 13,
|
||||
maxlight = 15,
|
||||
steps = 4
|
||||
}
|
||||
|
||||
-- add random cocoa pods to jungle tree's
|
||||
minetest.register_on_generated(function(minp, maxp)
|
||||
|
||||
|
@ -86,3 +86,12 @@ crop_def.drop = {
|
||||
}
|
||||
}
|
||||
minetest.register_node("farming:coffee_5", table.copy(crop_def))
|
||||
|
||||
-- add to registered_plants
|
||||
farming.registered_plants["farming:coffee"] = {
|
||||
crop = "farming:coffee",
|
||||
seed = "farming:coffee_beans",
|
||||
minlight = 13,
|
||||
maxlight = 15,
|
||||
steps = 5
|
||||
}
|
||||
|
@ -147,3 +147,12 @@ crop_def.drop = {
|
||||
}
|
||||
}
|
||||
minetest.register_node("farming:corn_8", table.copy(crop_def))
|
||||
|
||||
-- add to registered_plants
|
||||
farming.registered_plants["farming:corn"] = {
|
||||
crop = "farming:corn",
|
||||
seed = "farming:corn",
|
||||
minlight = 13,
|
||||
maxlight = 15,
|
||||
steps = 8
|
||||
}
|
||||
|
@ -142,6 +142,15 @@ crop_def.drop = {
|
||||
}
|
||||
minetest.register_node("farming:cotton_8", table.copy(crop_def))
|
||||
|
||||
-- add to registered_plants
|
||||
farming.registered_plants["farming:cotton"] = {
|
||||
crop = "farming:cotton",
|
||||
seed = "farming:seed_cotton",
|
||||
minlight = 13,
|
||||
maxlight = 15,
|
||||
steps = 8
|
||||
}
|
||||
|
||||
--[[ Cotton (example, is already registered in cotton.lua)
|
||||
farming.register_plant("farming:cotton", {
|
||||
description = "Cotton seed",
|
||||
|
@ -54,3 +54,12 @@ crop_def.drop = {
|
||||
}
|
||||
}
|
||||
minetest.register_node("farming:cucumber_4", table.copy(crop_def))
|
||||
|
||||
-- add to registered_plants
|
||||
farming.registered_plants["farming:cucumber"] = {
|
||||
crop = "farming:cucumber",
|
||||
seed = "farming:cucumber",
|
||||
minlight = 13,
|
||||
maxlight = 15,
|
||||
steps = 4
|
||||
}
|
||||
|
@ -27,7 +27,7 @@ minetest.register_craftitem("farming:garlic", {
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = "farming:garlic_clove 9",
|
||||
output = "farming:garlic_clove 8",
|
||||
recipe = { "farming:garlic" }
|
||||
})
|
||||
|
||||
@ -35,7 +35,7 @@ minetest.register_craft({
|
||||
output = "farming:garlic",
|
||||
recipe = {
|
||||
{"farming:garlic_clove", "farming:garlic_clove", "farming:garlic_clove"},
|
||||
{"farming:garlic_clove", "farming:garlic_clove", "farming:garlic_clove"},
|
||||
{"farming:garlic_clove", "", "farming:garlic_clove"},
|
||||
{"farming:garlic_clove", "farming:garlic_clove", "farming:garlic_clove"}
|
||||
}
|
||||
})
|
||||
@ -126,3 +126,12 @@ crop_def.drop = {
|
||||
}
|
||||
}
|
||||
minetest.register_node("farming:garlic_5", table.copy(crop_def))
|
||||
|
||||
-- add to registered_plants
|
||||
farming.registered_plants["farming:garlic"] = {
|
||||
crop = "farming:garlic",
|
||||
seed = "farming:garlic_clove",
|
||||
minlight = 13,
|
||||
maxlight = 15,
|
||||
steps = 5
|
||||
}
|
||||
|
@ -231,6 +231,15 @@ crop_def.drop = {
|
||||
}
|
||||
minetest.register_node("farming:grapes_8", table.copy(crop_def))
|
||||
|
||||
-- add to registered_plants
|
||||
farming.registered_plants["farming:grapes"] = {
|
||||
crop = "farming:grapes",
|
||||
seed = "farming:grapes",
|
||||
minlight = 13,
|
||||
maxlight = 15,
|
||||
steps = 8
|
||||
}
|
||||
|
||||
-- wild grape vine (this is what you find on the map)
|
||||
minetest.register_node("farming:grapebush", {
|
||||
drawtype = "plantlike",
|
||||
|
@ -249,3 +249,12 @@ crop_def.drop = {
|
||||
}
|
||||
}
|
||||
minetest.register_node("farming:hemp_8", table.copy(crop_def))
|
||||
|
||||
-- add to registered_plants
|
||||
farming.registered_plants["farming:hemp"] = {
|
||||
crop = "farming:hemp",
|
||||
seed = "farming:seed_hemp",
|
||||
minlight = 13,
|
||||
maxlight = 15,
|
||||
steps = 8
|
||||
}
|
||||
|
@ -84,3 +84,12 @@ crop_def.groups = {
|
||||
--crop_def.drop = "farming:melon_slice 9"
|
||||
crop_def.drop = "farming:melon_8"
|
||||
minetest.register_node("farming:melon_8", table.copy(crop_def))
|
||||
|
||||
-- add to registered_plants
|
||||
farming.registered_plants["farming:melon"] = {
|
||||
crop = "farming:melon",
|
||||
seed = "farming:melon_slice",
|
||||
minlight = 13,
|
||||
maxlight = 15,
|
||||
steps = 8
|
||||
}
|
||||
|
@ -66,3 +66,12 @@ crop_def.drop = {
|
||||
}
|
||||
}
|
||||
minetest.register_node("farming:onion_5", table.copy(crop_def))
|
||||
|
||||
-- add to registered_plants
|
||||
farming.registered_plants["farming:onion"] = {
|
||||
crop = "farming:onion",
|
||||
seed = "farming:onion",
|
||||
minlight = 13,
|
||||
maxlight = 15,
|
||||
steps = 5
|
||||
}
|
||||
|
@ -87,3 +87,12 @@ crop_def.drop = {
|
||||
}
|
||||
}
|
||||
minetest.register_node("farming:pea_5", table.copy(crop_def))
|
||||
|
||||
-- add to registered_plants
|
||||
farming.registered_plants["farming:pea_pod"] = {
|
||||
crop = "farming:pea",
|
||||
seed = "farming:pea_pod",
|
||||
minlight = 13,
|
||||
maxlight = 15,
|
||||
steps = 5
|
||||
}
|
||||
|
@ -104,3 +104,12 @@ crop_def.drop = {
|
||||
}
|
||||
}
|
||||
minetest.register_node("farming:pepper_5", table.copy(crop_def))
|
||||
|
||||
-- add to registered_plants
|
||||
farming.registered_plants["farming:pepper"] = {
|
||||
crop = "farming:pepper",
|
||||
seed = "farming:peppercorn",
|
||||
minlight = 13,
|
||||
maxlight = 15,
|
||||
steps = 5
|
||||
}
|
||||
|
@ -127,3 +127,12 @@ crop_def.drop = {
|
||||
}
|
||||
}
|
||||
minetest.register_node("farming:pineapple_8", table.copy(crop_def))
|
||||
|
||||
-- add to registered_plants
|
||||
farming.registered_plants["farming:pineapple"] = {
|
||||
crop = "farming:pineapple",
|
||||
seed = "farming:pineapple_top",
|
||||
minlight = 13,
|
||||
maxlight = 15,
|
||||
steps = 8
|
||||
}
|
||||
|
@ -92,3 +92,12 @@ crop_def.drop = {
|
||||
}
|
||||
}
|
||||
minetest.register_node("farming:potato_4", table.copy(crop_def))
|
||||
|
||||
-- add to registered_plants
|
||||
farming.registered_plants["farming:potato"] = {
|
||||
crop = "farming:potato",
|
||||
seed = "farming:potato",
|
||||
minlight = 13,
|
||||
maxlight = 15,
|
||||
steps = 4
|
||||
}
|
||||
|
@ -202,12 +202,16 @@ minetest.register_node("farming:pumpkin_8", {
|
||||
food_pumpkin = 1, choppy = 1, oddly_breakable_by_hand = 1,
|
||||
flammable = 2, plant = 1
|
||||
},
|
||||
-- drop = {
|
||||
-- items = {
|
||||
-- {items = {'farming:pumpkin_slice 9'}, rarity = 1},
|
||||
-- }
|
||||
-- },
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_alias("farming:pumpkin", "farming:pumpkin_8")
|
||||
|
||||
-- add to registered_plants
|
||||
farming.registered_plants["farming:pumpkin"] = {
|
||||
crop = "farming:pumpkin",
|
||||
seed = "farming:pumpkin_slice",
|
||||
minlight = 13,
|
||||
maxlight = 15,
|
||||
steps = 8
|
||||
}
|
||||
|
@ -67,3 +67,12 @@ crop_def.drop = {
|
||||
}
|
||||
}
|
||||
minetest.register_node("farming:raspberry_4", table.copy(crop_def))
|
||||
|
||||
-- add to registered_plants
|
||||
farming.registered_plants["farming:raspberries"] = {
|
||||
crop = "farming:raspberry",
|
||||
seed = "farming:raspberries",
|
||||
minlight = 13,
|
||||
maxlight = 15,
|
||||
steps = 4
|
||||
}
|
||||
|
@ -64,3 +64,12 @@ crop_def.drop = {
|
||||
}
|
||||
}
|
||||
minetest.register_node("farming:rhubarb_3", table.copy(crop_def))
|
||||
|
||||
-- add to registered_plants
|
||||
farming.registered_plants["farming:rhubarb"] = {
|
||||
crop = "farming:rhubarb",
|
||||
seed = "farming:rhubarb",
|
||||
minlight = 13,
|
||||
maxlight = 15,
|
||||
steps = 3
|
||||
}
|
||||
|
@ -77,3 +77,12 @@ crop_def.drop = {
|
||||
}
|
||||
}
|
||||
minetest.register_node("farming:tomato_8", table.copy(crop_def))
|
||||
|
||||
-- add to registered_plants
|
||||
farming.registered_plants["farming:tomato"] = {
|
||||
crop = "farming:tomato",
|
||||
seed = "farming:tomato",
|
||||
minlight = 13,
|
||||
maxlight = 15,
|
||||
steps = 8
|
||||
}
|
||||
|
@ -230,6 +230,15 @@ crop_def.drop = {
|
||||
}
|
||||
minetest.register_node("farming:wheat_8", table.copy(crop_def))
|
||||
|
||||
-- add to registered_plants
|
||||
farming.registered_plants["farming:wheat"] = {
|
||||
crop = "farming:wheat",
|
||||
seed = "farming:seed_wheat",
|
||||
minlight = 13,
|
||||
maxlight = 15,
|
||||
steps = 8
|
||||
}
|
||||
|
||||
-- fuels
|
||||
minetest.register_craft({
|
||||
type = "fuel",
|
||||
|
2
init.lua
2
init.lua
@ -585,7 +585,7 @@ farming.register_plant = function(name, def)
|
||||
|
||||
-- add to farming.registered_plants
|
||||
farming.registered_plants[mname .. ":" .. pname] = {
|
||||
name = mname .. ":" .. pname,
|
||||
crop = mname .. ":" .. pname,
|
||||
seed = mname .. ":seed_" .. pname,
|
||||
steps = def.steps,
|
||||
minlight = def.minlight,
|
||||
|
Loading…
Reference in New Issue
Block a user