forked from mtcontrib/farming
added seed=2 group to plantable food items
This commit is contained in:
parent
cc0fc2c763
commit
02d10c376e
@ -13,7 +13,8 @@ This mod works by adding your new plant to the {growing=1} group and numbering t
|
|||||||
|
|
||||||
### Changelog:
|
### Changelog:
|
||||||
|
|
||||||
- 1.42 - Soil needs water to be present within 3 blocks horizontally and 1 below to make wet soil, Jack 'o Lanterns now check protection, add chocolate block, scythe works on use instead of right-click
|
- 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.
|
||||||
|
- 1.42 - Soil needs water to be present within 3 blocks horizontally and 1 below to make wet soil, Jack 'o Lanterns now check protection, add chocolate block.
|
||||||
- 1.41 - Each crop has it's own spawn rate (can be changed in farming.conf)
|
- 1.41 - Each crop has it's own spawn rate (can be changed in farming.conf)
|
||||||
- 1.40 - Added Mithril Scythe to quick harvest and replant crops on right-click. Added Hoe's for MoreOres with Toolrank support.
|
- 1.40 - Added Mithril Scythe to quick harvest and replant crops on right-click. Added Hoe's for MoreOres with Toolrank support.
|
||||||
- 1.39 - Added Rice, Rye and Oats thanks to Ademants Grains mod. Added Jaffa Cake and multigrain bread.
|
- 1.39 - Added Rice, Rye and Oats thanks to Ademants Grains mod. Added Jaffa Cake and multigrain bread.
|
||||||
|
@ -72,7 +72,7 @@ end
|
|||||||
minetest.register_craftitem("farming:beans", {
|
minetest.register_craftitem("farming:beans", {
|
||||||
description = S("Green Beans"),
|
description = S("Green Beans"),
|
||||||
inventory_image = "farming_beans.png",
|
inventory_image = "farming_beans.png",
|
||||||
groups = {food_beans = 1, flammable = 2},
|
groups = {seed = 2, food_beans = 1, flammable = 2},
|
||||||
on_use = minetest.item_eat(1),
|
on_use = minetest.item_eat(1),
|
||||||
|
|
||||||
on_place = function(itemstack, placer, pointed_thing)
|
on_place = function(itemstack, placer, pointed_thing)
|
||||||
|
@ -5,7 +5,7 @@ local S = farming.intllib
|
|||||||
minetest.register_craftitem("farming:beetroot", {
|
minetest.register_craftitem("farming:beetroot", {
|
||||||
description = S("Beetroot"),
|
description = S("Beetroot"),
|
||||||
inventory_image = "farming_beetroot.png",
|
inventory_image = "farming_beetroot.png",
|
||||||
groups = {food_beetroot = 1, flammable = 2},
|
groups = {seed = 2, food_beetroot = 1, flammable = 2},
|
||||||
on_place = function(itemstack, placer, pointed_thing)
|
on_place = function(itemstack, placer, pointed_thing)
|
||||||
return farming.place_seed(itemstack, placer, pointed_thing, "farming:beetroot_1")
|
return farming.place_seed(itemstack, placer, pointed_thing, "farming:beetroot_1")
|
||||||
end,
|
end,
|
||||||
|
@ -5,7 +5,8 @@ local S = farming.intllib
|
|||||||
minetest.register_craftitem("farming:blueberries", {
|
minetest.register_craftitem("farming:blueberries", {
|
||||||
description = S("Blueberries"),
|
description = S("Blueberries"),
|
||||||
inventory_image = "farming_blueberries.png",
|
inventory_image = "farming_blueberries.png",
|
||||||
groups = {food_blueberries = 1, food_blueberry = 1, food_berry = 1, flammable = 2},
|
groups = {seed = 2, food_blueberries = 1, food_blueberry = 1,
|
||||||
|
food_berry = 1, flammable = 2},
|
||||||
on_place = function(itemstack, placer, pointed_thing)
|
on_place = function(itemstack, placer, pointed_thing)
|
||||||
return farming.place_seed(itemstack, placer, pointed_thing, "farming:blueberry_1")
|
return farming.place_seed(itemstack, placer, pointed_thing, "farming:blueberry_1")
|
||||||
end,
|
end,
|
||||||
|
@ -10,7 +10,7 @@ local S = farming.intllib
|
|||||||
minetest.register_craftitem("farming:carrot", {
|
minetest.register_craftitem("farming:carrot", {
|
||||||
description = S("Carrot"),
|
description = S("Carrot"),
|
||||||
inventory_image = "farming_carrot.png",
|
inventory_image = "farming_carrot.png",
|
||||||
groups = {food_carrot = 1, flammable = 2},
|
groups = {seed = 2, food_carrot = 1, flammable = 2},
|
||||||
on_place = function(itemstack, placer, pointed_thing)
|
on_place = function(itemstack, placer, pointed_thing)
|
||||||
return farming.place_seed(itemstack, placer, pointed_thing, "farming:carrot_1")
|
return farming.place_seed(itemstack, placer, pointed_thing, "farming:carrot_1")
|
||||||
end,
|
end,
|
||||||
|
@ -5,7 +5,7 @@ local S = farming.intllib
|
|||||||
minetest.register_craftitem("farming:chili_pepper", {
|
minetest.register_craftitem("farming:chili_pepper", {
|
||||||
description = S("Chili Pepper"),
|
description = S("Chili Pepper"),
|
||||||
inventory_image = "farming_chili_pepper.png",
|
inventory_image = "farming_chili_pepper.png",
|
||||||
groups = {food_chili_pepper = 1, flammable = 4},
|
groups = {seed = 2, food_chili_pepper = 1, flammable = 4},
|
||||||
on_place = function(itemstack, placer, pointed_thing)
|
on_place = function(itemstack, placer, pointed_thing)
|
||||||
return farming.place_seed(itemstack, placer, pointed_thing, "farming:chili_1")
|
return farming.place_seed(itemstack, placer, pointed_thing, "farming:chili_1")
|
||||||
end,
|
end,
|
||||||
|
@ -67,7 +67,7 @@ end
|
|||||||
minetest.register_craftitem("farming:cocoa_beans", {
|
minetest.register_craftitem("farming:cocoa_beans", {
|
||||||
description = S("Cocoa Beans"),
|
description = S("Cocoa Beans"),
|
||||||
inventory_image = "farming_cocoa_beans.png",
|
inventory_image = "farming_cocoa_beans.png",
|
||||||
groups = {food_cocoa = 1, flammable = 2},
|
groups = {seed = 2, food_cocoa = 1, flammable = 2},
|
||||||
on_place = function(itemstack, placer, pointed_thing)
|
on_place = function(itemstack, placer, pointed_thing)
|
||||||
return place_cocoa(itemstack, placer, pointed_thing, "farming:cocoa_1")
|
return place_cocoa(itemstack, placer, pointed_thing, "farming:cocoa_1")
|
||||||
end,
|
end,
|
||||||
|
@ -5,7 +5,7 @@ local S = farming.intllib
|
|||||||
minetest.register_craftitem("farming:coffee_beans", {
|
minetest.register_craftitem("farming:coffee_beans", {
|
||||||
description = S("Coffee Beans"),
|
description = S("Coffee Beans"),
|
||||||
inventory_image = "farming_coffee_beans.png",
|
inventory_image = "farming_coffee_beans.png",
|
||||||
groups = {food_coffee = 1, flammable = 2},
|
groups = {seed = 2, food_coffee = 1, flammable = 2},
|
||||||
on_place = function(itemstack, placer, pointed_thing)
|
on_place = function(itemstack, placer, pointed_thing)
|
||||||
return farming.place_seed(itemstack, placer, pointed_thing, "farming:coffee_1")
|
return farming.place_seed(itemstack, placer, pointed_thing, "farming:coffee_1")
|
||||||
end,
|
end,
|
||||||
|
@ -10,7 +10,7 @@ local S = farming.intllib
|
|||||||
minetest.register_craftitem("farming:corn", {
|
minetest.register_craftitem("farming:corn", {
|
||||||
description = S("Corn"),
|
description = S("Corn"),
|
||||||
inventory_image = "farming_corn.png",
|
inventory_image = "farming_corn.png",
|
||||||
groups = {food_corn = 1, flammable = 2},
|
groups = {seed = 2, food_corn = 1, flammable = 2},
|
||||||
on_place = function(itemstack, placer, pointed_thing)
|
on_place = function(itemstack, placer, pointed_thing)
|
||||||
return farming.place_seed(itemstack, placer, pointed_thing, "farming:corn_1")
|
return farming.place_seed(itemstack, placer, pointed_thing, "farming:corn_1")
|
||||||
end,
|
end,
|
||||||
|
@ -10,7 +10,7 @@ local S = farming.intllib
|
|||||||
minetest.register_craftitem("farming:cucumber", {
|
minetest.register_craftitem("farming:cucumber", {
|
||||||
description = S("Cucumber"),
|
description = S("Cucumber"),
|
||||||
inventory_image = "farming_cucumber.png",
|
inventory_image = "farming_cucumber.png",
|
||||||
groups = {food_cucumber = 1, flammable = 2},
|
groups = {seed = 2, food_cucumber = 1, flammable = 2},
|
||||||
on_place = function(itemstack, placer, pointed_thing)
|
on_place = function(itemstack, placer, pointed_thing)
|
||||||
return farming.place_seed(itemstack, placer, pointed_thing, "farming:cucumber_1")
|
return farming.place_seed(itemstack, placer, pointed_thing, "farming:cucumber_1")
|
||||||
end,
|
end,
|
||||||
|
@ -11,7 +11,7 @@ local S = farming.intllib
|
|||||||
minetest.register_craftitem("farming:garlic_clove", {
|
minetest.register_craftitem("farming:garlic_clove", {
|
||||||
description = S("Garlic clove"),
|
description = S("Garlic clove"),
|
||||||
inventory_image = "crops_garlic_clove.png",
|
inventory_image = "crops_garlic_clove.png",
|
||||||
groups = {food_garlic_clove = 1, flammable = 3},
|
groups = {seed = 2, food_garlic_clove = 1, flammable = 3},
|
||||||
on_place = function(itemstack, placer, pointed_thing)
|
on_place = function(itemstack, placer, pointed_thing)
|
||||||
return farming.place_seed(itemstack, placer, pointed_thing, "farming:garlic_1")
|
return farming.place_seed(itemstack, placer, pointed_thing, "farming:garlic_1")
|
||||||
end,
|
end,
|
||||||
|
@ -68,7 +68,7 @@ minetest.register_craftitem("farming:grapes", {
|
|||||||
description = S("Grapes"),
|
description = S("Grapes"),
|
||||||
inventory_image = "farming_grapes.png",
|
inventory_image = "farming_grapes.png",
|
||||||
on_use = minetest.item_eat(2),
|
on_use = minetest.item_eat(2),
|
||||||
groups = {food_grapes = 1, flammable = 3},
|
groups = {seed = 2, food_grapes = 1, flammable = 3},
|
||||||
|
|
||||||
on_place = function(itemstack, placer, pointed_thing)
|
on_place = function(itemstack, placer, pointed_thing)
|
||||||
return place_grapes(itemstack, placer, pointed_thing, "farming:grapes_1")
|
return place_grapes(itemstack, placer, pointed_thing, "farming:grapes_1")
|
||||||
|
@ -5,7 +5,7 @@ local S = farming.intllib
|
|||||||
minetest.register_craftitem("farming:melon_slice", {
|
minetest.register_craftitem("farming:melon_slice", {
|
||||||
description = S("Melon Slice"),
|
description = S("Melon Slice"),
|
||||||
inventory_image = "farming_melon_slice.png",
|
inventory_image = "farming_melon_slice.png",
|
||||||
groups = {food_melon_slice = 1, flammable = 3},
|
groups = {seed = 2, food_melon_slice = 1, flammable = 3},
|
||||||
on_place = function(itemstack, placer, pointed_thing)
|
on_place = function(itemstack, placer, pointed_thing)
|
||||||
return farming.place_seed(itemstack, placer, pointed_thing, "farming:melon_1")
|
return farming.place_seed(itemstack, placer, pointed_thing, "farming:melon_1")
|
||||||
end,
|
end,
|
||||||
|
@ -11,7 +11,7 @@ local S = farming.intllib
|
|||||||
minetest.register_craftitem("farming:onion", {
|
minetest.register_craftitem("farming:onion", {
|
||||||
description = S("Onion"),
|
description = S("Onion"),
|
||||||
inventory_image = "crops_onion.png",
|
inventory_image = "crops_onion.png",
|
||||||
groups = {food_onion = 1, flammable = 3},
|
groups = {seed = 2, food_onion = 1, flammable = 3},
|
||||||
on_place = function(itemstack, placer, pointed_thing)
|
on_place = function(itemstack, placer, pointed_thing)
|
||||||
return farming.place_seed(itemstack, placer, pointed_thing, "farming:onion_1")
|
return farming.place_seed(itemstack, placer, pointed_thing, "farming:onion_1")
|
||||||
end,
|
end,
|
||||||
|
@ -7,7 +7,7 @@ local S = farming.intllib
|
|||||||
minetest.register_craftitem("farming:pea_pod", {
|
minetest.register_craftitem("farming:pea_pod", {
|
||||||
description = S("Pea Pod"),
|
description = S("Pea Pod"),
|
||||||
inventory_image = "farming_pea_pod.png",
|
inventory_image = "farming_pea_pod.png",
|
||||||
groups = {food_pea_pod = 1, flammable = 2},
|
groups = {seed = 2, food_pea_pod = 1, flammable = 2},
|
||||||
on_place = function(itemstack, placer, pointed_thing)
|
on_place = function(itemstack, placer, pointed_thing)
|
||||||
return farming.place_seed(itemstack, placer, pointed_thing, "farming:pea_1")
|
return farming.place_seed(itemstack, placer, pointed_thing, "farming:pea_1")
|
||||||
end
|
end
|
||||||
|
@ -11,7 +11,7 @@ local S = farming.intllib
|
|||||||
minetest.register_craftitem("farming:peppercorn", {
|
minetest.register_craftitem("farming:peppercorn", {
|
||||||
description = S("Peppercorn"),
|
description = S("Peppercorn"),
|
||||||
inventory_image = "crops_peppercorn.png",
|
inventory_image = "crops_peppercorn.png",
|
||||||
groups = {food_peppercorn = 1, flammable = 3},
|
groups = {seed = 1, food_peppercorn = 1, flammable = 3},
|
||||||
on_place = function(itemstack, placer, pointed_thing)
|
on_place = function(itemstack, placer, pointed_thing)
|
||||||
return farming.place_seed(itemstack, placer, pointed_thing, "farming:pepper_1")
|
return farming.place_seed(itemstack, placer, pointed_thing, "farming:pepper_1")
|
||||||
end,
|
end,
|
||||||
|
@ -5,6 +5,7 @@ local S = farming.intllib
|
|||||||
minetest.register_craftitem("farming:pineapple_top", {
|
minetest.register_craftitem("farming:pineapple_top", {
|
||||||
description = S("Pineapple Top"),
|
description = S("Pineapple Top"),
|
||||||
inventory_image = "farming_pineapple_top.png",
|
inventory_image = "farming_pineapple_top.png",
|
||||||
|
groups = {seed = 2, flammable = 2},
|
||||||
on_place = function(itemstack, placer, pointed_thing)
|
on_place = function(itemstack, placer, pointed_thing)
|
||||||
return farming.place_seed(itemstack, placer, pointed_thing, "farming:pineapple_1")
|
return farming.place_seed(itemstack, placer, pointed_thing, "farming:pineapple_1")
|
||||||
end,
|
end,
|
||||||
|
@ -10,7 +10,7 @@ local S = farming.intllib
|
|||||||
minetest.register_craftitem("farming:potato", {
|
minetest.register_craftitem("farming:potato", {
|
||||||
description = S("Potato"),
|
description = S("Potato"),
|
||||||
inventory_image = "farming_potato.png",
|
inventory_image = "farming_potato.png",
|
||||||
groups = {food_potato = 1, flammable = 2},
|
groups = {seed = 2, food_potato = 1, flammable = 2},
|
||||||
on_place = function(itemstack, placer, pointed_thing)
|
on_place = function(itemstack, placer, pointed_thing)
|
||||||
return farming.place_seed(itemstack, placer, pointed_thing, "farming:potato_1")
|
return farming.place_seed(itemstack, placer, pointed_thing, "farming:potato_1")
|
||||||
end,
|
end,
|
||||||
|
@ -9,7 +9,7 @@ local S = farming.intllib
|
|||||||
minetest.register_craftitem("farming:pumpkin_slice", {
|
minetest.register_craftitem("farming:pumpkin_slice", {
|
||||||
description = S("Pumpkin Slice"),
|
description = S("Pumpkin Slice"),
|
||||||
inventory_image = "farming_pumpkin_slice.png",
|
inventory_image = "farming_pumpkin_slice.png",
|
||||||
groups = {food_pumpkin_slice = 1, flammable = 2},
|
groups = {seed = 2, food_pumpkin_slice = 1, flammable = 2},
|
||||||
on_place = function(itemstack, placer, pointed_thing)
|
on_place = function(itemstack, placer, pointed_thing)
|
||||||
return farming.place_seed(itemstack, placer, pointed_thing, "farming:pumpkin_1")
|
return farming.place_seed(itemstack, placer, pointed_thing, "farming:pumpkin_1")
|
||||||
end,
|
end,
|
||||||
|
@ -5,7 +5,8 @@ local S = farming.intllib
|
|||||||
minetest.register_craftitem("farming:raspberries", {
|
minetest.register_craftitem("farming:raspberries", {
|
||||||
description = S("Raspberries"),
|
description = S("Raspberries"),
|
||||||
inventory_image = "farming_raspberries.png",
|
inventory_image = "farming_raspberries.png",
|
||||||
groups = {food_raspberries = 1, food_raspberry = 1, food_berry = 1, flammable = 2},
|
groups = {seed = 2, food_raspberries = 1, food_raspberry = 1,
|
||||||
|
food_berry = 1, flammable = 2},
|
||||||
on_place = function(itemstack, placer, pointed_thing)
|
on_place = function(itemstack, placer, pointed_thing)
|
||||||
return farming.place_seed(itemstack, placer, pointed_thing, "farming:raspberry_1")
|
return farming.place_seed(itemstack, placer, pointed_thing, "farming:raspberry_1")
|
||||||
end,
|
end,
|
||||||
|
@ -5,7 +5,7 @@ local S = farming.intllib
|
|||||||
minetest.register_craftitem("farming:rhubarb", {
|
minetest.register_craftitem("farming:rhubarb", {
|
||||||
description = S("Rhubarb"),
|
description = S("Rhubarb"),
|
||||||
inventory_image = "farming_rhubarb.png",
|
inventory_image = "farming_rhubarb.png",
|
||||||
groups = {food_rhubarb = 1, flammable = 2},
|
groups = {seed = 2, food_rhubarb = 1, flammable = 2},
|
||||||
on_place = function(itemstack, placer, pointed_thing)
|
on_place = function(itemstack, placer, pointed_thing)
|
||||||
return farming.place_seed(itemstack, placer, pointed_thing, "farming:rhubarb_1")
|
return farming.place_seed(itemstack, placer, pointed_thing, "farming:rhubarb_1")
|
||||||
end,
|
end,
|
||||||
|
@ -10,7 +10,7 @@ local S = farming.intllib
|
|||||||
minetest.register_craftitem("farming:tomato", {
|
minetest.register_craftitem("farming:tomato", {
|
||||||
description = S("Tomato"),
|
description = S("Tomato"),
|
||||||
inventory_image = "farming_tomato.png",
|
inventory_image = "farming_tomato.png",
|
||||||
groups = {food_tomato = 1, flammable = 2},
|
groups = {seed = 2, food_tomato = 1, flammable = 2},
|
||||||
on_place = function(itemstack, placer, pointed_thing)
|
on_place = function(itemstack, placer, pointed_thing)
|
||||||
return farming.place_seed(itemstack, placer, pointed_thing, "farming:tomato_1")
|
return farming.place_seed(itemstack, placer, pointed_thing, "farming:tomato_1")
|
||||||
end,
|
end,
|
||||||
|
4
init.lua
4
init.lua
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
farming = {
|
farming = {
|
||||||
mod = "redo",
|
mod = "redo",
|
||||||
version = "20190728",
|
version = "20191202",
|
||||||
path = minetest.get_modpath("farming"),
|
path = minetest.get_modpath("farming"),
|
||||||
select = {
|
select = {
|
||||||
type = "fixed",
|
type = "fixed",
|
||||||
@ -278,7 +278,7 @@ end)
|
|||||||
-- Just in case a growing type or added node is missed (also catches existing
|
-- Just in case a growing type or added node is missed (also catches existing
|
||||||
-- nodes added to map before timers were incorporated).
|
-- nodes added to map before timers were incorporated).
|
||||||
minetest.register_abm({
|
minetest.register_abm({
|
||||||
nodenames = { "group:growing" },
|
nodenames = {"group:growing"},
|
||||||
interval = 300,
|
interval = 300,
|
||||||
chance = 1,
|
chance = 1,
|
||||||
catch_up = false,
|
catch_up = false,
|
||||||
|
Loading…
Reference in New Issue
Block a user