ryeoatrice.lua 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. local S = farming.translate
  2. --= A nice addition from Ademant's grain mod :)
  3. -- Rye
  4. farming.register_plant("farming:rye", {
  5. description = S("Rye seed"),
  6. paramtype2 = "meshoptions",
  7. inventory_image = "farming_rye_seed.png",
  8. steps = 8,
  9. place_param2 = 3
  10. })
  11. minetest.override_item("farming:rye", {
  12. description = S("Rye"),
  13. groups = {compostability = 65, food_rye = 1, flammable = 4}
  14. })
  15. minetest.override_item("farming:rye_1", {drop = {}})
  16. minetest.override_item("farming:rye_2", {drop = {}})
  17. minetest.override_item("farming:rye_3", {drop = {}})
  18. local tmp = farming.use_utensils and "farming:mortar_pestle" or ""
  19. minetest.register_craft({
  20. output = "farming:flour",
  21. recipe = {
  22. {"farming:rye", "farming:rye", "farming:rye"},
  23. {"farming:rye", tmp, ""}
  24. },
  25. replacements = {{"group:food_mortar_pestle", "farming:mortar_pestle"}}
  26. })
  27. -- Oats
  28. farming.register_plant("farming:oat", {
  29. description = S("Oat seed"),
  30. paramtype2 = "meshoptions",
  31. inventory_image = "farming_oat_seed.png",
  32. steps = 8,
  33. place_param2 = 3
  34. })
  35. minetest.override_item("farming:oat", {
  36. description = S("Oats"),
  37. groups = {compostability = 65, food_oats = 1, flammable = 4}
  38. })
  39. minetest.override_item("farming:oat_1", {drop = {}})
  40. minetest.override_item("farming:oat_2", {drop = {}})
  41. minetest.override_item("farming:oat_3", {drop = {}})
  42. minetest.register_craft({
  43. output = "farming:flour",
  44. recipe = {
  45. {"farming:oat", "farming:oat", "farming:oat"},
  46. {"farming:oat", tmp, ""}
  47. },
  48. replacements = {{"group:food_mortar_pestle", "farming:mortar_pestle"}}
  49. })
  50. -- Multigrain flour
  51. minetest.register_craftitem("farming:flour_multigrain", {
  52. description = S("Multigrain Flour"),
  53. inventory_image = "farming_flour_multigrain.png",
  54. groups = {compostability = 65, food_flour = 1, flammable = 1},
  55. })
  56. minetest.register_craft({
  57. type = "shapeless",
  58. output = "farming:flour_multigrain",
  59. recipe = {
  60. "farming:wheat", "farming:barley", "farming:oat",
  61. "farming:rye", tmp
  62. },
  63. replacements = {{"group:food_mortar_pestle", "farming:mortar_pestle"}}
  64. })
  65. -- Multigrain bread
  66. minetest.register_craftitem("farming:bread_multigrain", {
  67. description = S("Multigrain Bread"),
  68. inventory_image = "farming_bread_multigrain.png",
  69. on_use = minetest.item_eat(7),
  70. groups = {compostability = 65, food_bread = 1, flammable = 2}
  71. })
  72. minetest.register_craft({
  73. type = "cooking",
  74. cooktime = 15,
  75. output = "farming:bread_multigrain",
  76. recipe = "farming:flour_multigrain"
  77. })
  78. -- Fuels
  79. minetest.register_craft({
  80. type = "fuel",
  81. recipe = "farming:bread_multigrain",
  82. burntime = 1
  83. })
  84. minetest.register_craft({
  85. type = "fuel",
  86. recipe = "farming:rye",
  87. burntime = 1
  88. })
  89. minetest.register_craft({
  90. type = "fuel",
  91. recipe = "farming:oat",
  92. burntime = 1
  93. })