Browse Source

added seed=2 group to plantable food items

pull/20/head
TenPlus1 5 months ago
parent
commit
02d10c376e
23 changed files with 27 additions and 23 deletions
  1. +2
    -1
      README.md
  2. +1
    -1
      crops/beans.lua
  3. +1
    -1
      crops/beetroot.lua
  4. +2
    -1
      crops/blueberry.lua
  5. +1
    -1
      crops/carrot.lua
  6. +1
    -1
      crops/chili.lua
  7. +1
    -1
      crops/cocoa.lua
  8. +1
    -1
      crops/coffee.lua
  9. +1
    -1
      crops/corn.lua
  10. +1
    -1
      crops/cucumber.lua
  11. +1
    -1
      crops/garlic.lua
  12. +1
    -1
      crops/grapes.lua
  13. +1
    -1
      crops/melon.lua
  14. +1
    -1
      crops/onion.lua
  15. +1
    -1
      crops/peas.lua
  16. +1
    -1
      crops/pepper.lua
  17. +1
    -0
      crops/pineapple.lua
  18. +1
    -1
      crops/potato.lua
  19. +1
    -1
      crops/pumpkin.lua
  20. +2
    -1
      crops/raspberry.lua
  21. +1
    -1
      crops/rhubarb.lua
  22. +1
    -1
      crops/tomato.lua
  23. +2
    -2
      init.lua

+ 2
- 1
README.md View File

@@ -13,7 +13,8 @@ This mod works by adding your new plant to the {growing=1} group and numbering t

### 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.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
- 1
crops/beans.lua View File

@@ -72,7 +72,7 @@ end
minetest.register_craftitem("farming:beans", {
description = S("Green Beans"),
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_place = function(itemstack, placer, pointed_thing)


+ 1
- 1
crops/beetroot.lua View File

@@ -5,7 +5,7 @@ local S = farming.intllib
minetest.register_craftitem("farming:beetroot", {
description = S("Beetroot"),
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)
return farming.place_seed(itemstack, placer, pointed_thing, "farming:beetroot_1")
end,


+ 2
- 1
crops/blueberry.lua View File

@@ -5,7 +5,8 @@ local S = farming.intllib
minetest.register_craftitem("farming:blueberries", {
description = S("Blueberries"),
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)
return farming.place_seed(itemstack, placer, pointed_thing, "farming:blueberry_1")
end,


+ 1
- 1
crops/carrot.lua View File

@@ -10,7 +10,7 @@ local S = farming.intllib
minetest.register_craftitem("farming:carrot", {
description = S("Carrot"),
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)
return farming.place_seed(itemstack, placer, pointed_thing, "farming:carrot_1")
end,


+ 1
- 1
crops/chili.lua View File

@@ -5,7 +5,7 @@ local S = farming.intllib
minetest.register_craftitem("farming:chili_pepper", {
description = S("Chili Pepper"),
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)
return farming.place_seed(itemstack, placer, pointed_thing, "farming:chili_1")
end,


+ 1
- 1
crops/cocoa.lua View File

@@ -67,7 +67,7 @@ end
minetest.register_craftitem("farming:cocoa_beans", {
description = S("Cocoa Beans"),
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)
return place_cocoa(itemstack, placer, pointed_thing, "farming:cocoa_1")
end,


+ 1
- 1
crops/coffee.lua View File

@@ -5,7 +5,7 @@ local S = farming.intllib
minetest.register_craftitem("farming:coffee_beans", {
description = S("Coffee Beans"),
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)
return farming.place_seed(itemstack, placer, pointed_thing, "farming:coffee_1")
end,


+ 1
- 1
crops/corn.lua View File

@@ -10,7 +10,7 @@ local S = farming.intllib
minetest.register_craftitem("farming:corn", {
description = S("Corn"),
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)
return farming.place_seed(itemstack, placer, pointed_thing, "farming:corn_1")
end,


+ 1
- 1
crops/cucumber.lua View File

@@ -10,7 +10,7 @@ local S = farming.intllib
minetest.register_craftitem("farming:cucumber", {
description = S("Cucumber"),
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)
return farming.place_seed(itemstack, placer, pointed_thing, "farming:cucumber_1")
end,


+ 1
- 1
crops/garlic.lua View File

@@ -11,7 +11,7 @@ local S = farming.intllib
minetest.register_craftitem("farming:garlic_clove", {
description = S("Garlic clove"),
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)
return farming.place_seed(itemstack, placer, pointed_thing, "farming:garlic_1")
end,


+ 1
- 1
crops/grapes.lua View File

@@ -68,7 +68,7 @@ minetest.register_craftitem("farming:grapes", {
description = S("Grapes"),
inventory_image = "farming_grapes.png",
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)
return place_grapes(itemstack, placer, pointed_thing, "farming:grapes_1")


+ 1
- 1
crops/melon.lua View File

@@ -5,7 +5,7 @@ local S = farming.intllib
minetest.register_craftitem("farming:melon_slice", {
description = S("Melon Slice"),
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)
return farming.place_seed(itemstack, placer, pointed_thing, "farming:melon_1")
end,


+ 1
- 1
crops/onion.lua View File

@@ -11,7 +11,7 @@ local S = farming.intllib
minetest.register_craftitem("farming:onion", {
description = S("Onion"),
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)
return farming.place_seed(itemstack, placer, pointed_thing, "farming:onion_1")
end,


+ 1
- 1
crops/peas.lua View File

@@ -7,7 +7,7 @@ local S = farming.intllib
minetest.register_craftitem("farming:pea_pod", {
description = S("Pea Pod"),
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)
return farming.place_seed(itemstack, placer, pointed_thing, "farming:pea_1")
end


+ 1
- 1
crops/pepper.lua View File

@@ -11,7 +11,7 @@ local S = farming.intllib
minetest.register_craftitem("farming:peppercorn", {
description = S("Peppercorn"),
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)
return farming.place_seed(itemstack, placer, pointed_thing, "farming:pepper_1")
end,


+ 1
- 0
crops/pineapple.lua View File

@@ -5,6 +5,7 @@ local S = farming.intllib
minetest.register_craftitem("farming:pineapple_top", {
description = S("Pineapple Top"),
inventory_image = "farming_pineapple_top.png",
groups = {seed = 2, flammable = 2},
on_place = function(itemstack, placer, pointed_thing)
return farming.place_seed(itemstack, placer, pointed_thing, "farming:pineapple_1")
end,


+ 1
- 1
crops/potato.lua View File

@@ -10,7 +10,7 @@ local S = farming.intllib
minetest.register_craftitem("farming:potato", {
description = S("Potato"),
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)
return farming.place_seed(itemstack, placer, pointed_thing, "farming:potato_1")
end,


+ 1
- 1
crops/pumpkin.lua View File

@@ -9,7 +9,7 @@ local S = farming.intllib
minetest.register_craftitem("farming:pumpkin_slice", {
description = S("Pumpkin Slice"),
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)
return farming.place_seed(itemstack, placer, pointed_thing, "farming:pumpkin_1")
end,


+ 2
- 1
crops/raspberry.lua View File

@@ -5,7 +5,8 @@ local S = farming.intllib
minetest.register_craftitem("farming:raspberries", {
description = S("Raspberries"),
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)
return farming.place_seed(itemstack, placer, pointed_thing, "farming:raspberry_1")
end,


+ 1
- 1
crops/rhubarb.lua View File

@@ -5,7 +5,7 @@ local S = farming.intllib
minetest.register_craftitem("farming:rhubarb", {
description = S("Rhubarb"),
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)
return farming.place_seed(itemstack, placer, pointed_thing, "farming:rhubarb_1")
end,


+ 1
- 1
crops/tomato.lua View File

@@ -10,7 +10,7 @@ local S = farming.intllib
minetest.register_craftitem("farming:tomato", {
description = S("Tomato"),
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)
return farming.place_seed(itemstack, placer, pointed_thing, "farming:tomato_1")
end,


+ 2
- 2
init.lua View File

@@ -7,7 +7,7 @@

farming = {
mod = "redo",
version = "20190728",
version = "20191202",
path = minetest.get_modpath("farming"),
select = {
type = "fixed",
@@ -278,7 +278,7 @@ end)
-- Just in case a growing type or added node is missed (also catches existing
-- nodes added to map before timers were incorporated).
minetest.register_abm({
nodenames = { "group:growing" },
nodenames = {"group:growing"},
interval = 300,
chance = 1,
catch_up = false,


Loading…
Cancel
Save