craft.lua 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. local S = farming.intllib
  2. local modname=minetest.get_current_modname()
  3. local modlist=minetest.get_modnames()
  4. -- defining template for roasting
  5. local function roast_seed(seed_name,roast_name,cooktime)
  6. minetest.register_craft({
  7. type = "cooking",
  8. cooktime = cooktime or 3,
  9. output = roast_name,
  10. recipe = seed_name
  11. })
  12. end
  13. -- craft flour with mortar
  14. -- minetest.clear_craft({output="farming:flour"})
  15. minetest.register_craft({
  16. type = "shapeless",
  17. output = "farming:flour",
  18. recipe = {
  19. "group:for_flour", "group:for_flour", "group:for_flour",
  20. "group:for_flour", modname..":mortar_pestle"
  21. },
  22. replacements = {{"group:food_mortar_pestle", modname..":mortar_pestle"}},
  23. })
  24. minetest.register_craft({
  25. type = "shapeless",
  26. output = "farming:flour",
  27. recipe = {
  28. "group:for_flour", "group:for_flour", "group:for_flour",
  29. modname..":mortar_pestle_highlevel"
  30. },
  31. replacements = {{modname..":mortar_pestle_highlevel", modname..":mortar_pestle_highlevel"}},
  32. })
  33. minetest.register_craftitem("farming:flour", {
  34. description = "Flour",
  35. inventory_image = "farming_flour.png",
  36. groups = {food_flour = 1, flammable = 1},
  37. })
  38. if basic_functions.has_value(modlist,"vessels") and basic_functions.has_value(modlist,"bucket") then
  39. minetest.register_craftitem(modname..":nettle_water",{
  40. description = "Nettle Water",
  41. inventory_image = "farming_tool_glass_nettle.png",
  42. groups = {desinfect = 1}
  43. })
  44. minetest.register_craft({
  45. output=modname..":nettle_water",
  46. type = "shapeless",
  47. recipe={"vessels:glass_bottle","bucket:bucket_water",modname..":nettle"},
  48. replacements = {{"bucket:bucket_water", "bucket:bucket_empty"}}
  49. })
  50. end
  51. minetest.register_craft({
  52. type = "fuel",
  53. recipe = "farming:straw",
  54. burntime = 10,
  55. })
  56. minetest.register_craft({
  57. type = "fuel",
  58. recipe = "farming:nettle_fibre",
  59. burntime = 8,
  60. })
  61. minetest.register_craft({
  62. type = "fuel",
  63. recipe = "farming:hemp_fibre",
  64. burntime = 8,
  65. })