crafting.lua 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. -- support for i18n
  2. local S = minetest.get_translator("ferns")
  3. -----------------------------------------------------------------------------------------------
  4. -- Ferns - Crafting 0.0.5
  5. -----------------------------------------------------------------------------------------------
  6. -- (by Mossmanikin)
  7. -----------------------------------------------------------------------------------------------
  8. local fern1 = minetest.registered_items["default:fern_1"] or false
  9. fern1 = (fern1 and fern1.name) or "ferns:fern_01"
  10. minetest.register_craft({
  11. type = "shapeless",
  12. output = "ferns:fiddlehead 3",
  13. recipe = {"ferns:fern_01"},
  14. replacements = {
  15. {fern1, "ferns:ferntuber"}
  16. },
  17. })
  18. minetest.register_craft({
  19. type = "shapeless",
  20. output = "ferns:fiddlehead 3",
  21. recipe = {"ferns:tree_fern_leaves"},
  22. replacements = {
  23. {"ferns:tree_fern_leaves", "ferns:sapling_tree_fern"}
  24. },
  25. })
  26. -----------------------------------------------------------------------------------------------
  27. -- FIDDLEHEAD
  28. -----------------------------------------------------------------------------------------------
  29. minetest.register_alias("archaeplantae:fiddlehead", "ferns:fiddlehead")
  30. minetest.register_craftitem("ferns:fiddlehead", {
  31. description = S("Fiddlehead"),
  32. inventory_image = "ferns_fiddlehead.png",
  33. on_use = minetest.item_eat(-1), -- slightly poisonous when raw
  34. })
  35. minetest.register_craft({
  36. type = "cooking",
  37. output = "ferns:fiddlehead_roasted",
  38. recipe = "ferns:fiddlehead",
  39. cooktime = 1,
  40. })
  41. minetest.register_craftitem("ferns:fiddlehead_roasted", {
  42. description = S("Roasted Fiddlehead"),
  43. inventory_image = "ferns_fiddlehead_roasted.png",
  44. on_use = minetest.item_eat(1), -- edible when cooked
  45. })
  46. -----------------------------------------------------------------------------------------------
  47. -- FERN TUBER
  48. -----------------------------------------------------------------------------------------------
  49. minetest.register_alias("archaeplantae:ferntuber", "ferns:ferntuber")
  50. minetest.register_craftitem("ferns:ferntuber", {
  51. description = S("Fern Tuber"),
  52. inventory_image = "ferns_ferntuber.png",
  53. })
  54. minetest.register_craft({
  55. type = "cooking",
  56. output = "ferns:ferntuber_roasted",
  57. recipe = "ferns:ferntuber",
  58. cooktime = 3,
  59. })
  60. minetest.register_alias("archaeplantae:ferntuber_roasted", "ferns:ferntuber_roasted")
  61. minetest.register_craftitem("ferns:ferntuber_roasted", {
  62. description = S("Roasted Fern Tuber"),
  63. inventory_image = "ferns_ferntuber_roasted.png",
  64. on_use = minetest.item_eat(3),
  65. })
  66. -----------------------------------------------------------------------------------------------
  67. -- HORSETAIL (EQUISETUM) --> GREEN DYE https://en.wikipedia.org/wiki/Equisetum
  68. -----------------------------------------------------------------------------------------------
  69. minetest.register_craft({
  70. type = "shapeless",
  71. output = "dye:green",
  72. recipe = {"group:horsetail"},
  73. })
  74. -----------------------------------------------------------------------------------------------
  75. -- GLUE WOODEN TOOLS with RESIN & POLISH them with HORSETAIL (planned)
  76. -----------------------------------------------------------------------------------------------
  77. --[[minetest.register_craft({
  78. type = "shapeless",
  79. output = "default:pick_wood",
  80. recipe = {"default:pick_wood","group:horsetail","farming:string","default:stick"},
  81. })
  82. minetest.register_craft({
  83. type = "shapeless",
  84. output = "default:shovel_wood",
  85. recipe = {"default:shovel_wood","group:horsetail","farming:string","default:stick"},
  86. })
  87. minetest.register_craft({
  88. type = "shapeless",
  89. output = "default:axe_wood",
  90. recipe = {"default:axe_wood","group:horsetail","farming:string","default:stick"},
  91. })
  92. minetest.register_craft({
  93. type = "shapeless",
  94. output = "default:sword_wood",
  95. recipe = {"default:sword_wood","group:horsetail","farming:string","default:stick"},
  96. })
  97. minetest.register_craft({
  98. type = "shapeless",
  99. output = "farming:hoe_wood",
  100. recipe = {"farming:hoe_wood","group:horsetail","farming:string","default:stick"},
  101. })]]