xfarming.lua 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  1. local ingredient = "group:food_lettuce"
  2. local pot = "sandwiches:pot"
  3. local skillet = "sandwiches:skillet"
  4. if minetest.global_exists("farming") and farming.mod == "redo" then
  5. pot = "farming:pot"
  6. skillet = "farming:skillet"
  7. ingredient = "group:food_cucumber"
  8. end
  9. if sandwiches.ingredient_support.dairy then
  10. ingredient = "group:food_cheese"
  11. end
  12. -- SANDWICHES --
  13. minetest.register_craftitem("sandwiches:po_boy_sandwich", {
  14. description = "Po\'boy sandwich",
  15. on_use = minetest.item_eat(7, "sandwiches:bread_crumbs"),
  16. groups = {food = 7, food_sandwich = 1},
  17. inventory_image = "po_boy_sandwich.png"
  18. })
  19. minetest.register_craft({
  20. output = "sandwiches:po_boy_sandwich",
  21. recipe = {
  22. {"", "sandwiches:bread_slice", ""},
  23. {ingredient, "x_farming:shrimp_cooked", "group:food_tomato"},
  24. {"", "sandwiches:bread_slice", ""},
  25. }
  26. })
  27. -- ALREADY EXISTING SANDWICHES CRAFT --
  28. minetest.register_craft({
  29. output = "sandwiches:hot_veggie_sandwich",
  30. recipe = {
  31. {"", "sandwiches:bread_slice", ""},
  32. {"x_farming:carrot", "sandwiches:tabasco", "x_farming:potato"},
  33. {"", "sandwiches:bread_slice", ""},
  34. },
  35. replacements = {{"sandwiches:tabasco", "vessels:glass_bottle"},}
  36. })
  37. minetest.register_craft({
  38. output = "sandwiches:hot_veggie_sandwich",
  39. recipe = {
  40. {"", "sandwiches:bread_slice", ""},
  41. {"x_farming:carrot", "sandwiches:tabasco", "group:food_onion"},
  42. {"", "sandwiches:bread_slice", ""},
  43. },
  44. replacements = {{"sandwiches:tabasco", "vessels:glass_bottle"},}
  45. })
  46. minetest.register_craft({
  47. output = "sandwiches:veggie_sandwich",
  48. recipe = {
  49. {"", "sandwiches:bread_slice", ""},
  50. {"group:food_cucumber", "x_farming:carrot", "x_farming:potato"},
  51. {"", "sandwiches:bread_slice", ""},
  52. },
  53. })
  54. minetest.register_craft({
  55. output = "sandwiches:veggie_sandwich",
  56. recipe = {
  57. {"", "sandwiches:bread_slice", ""},
  58. {"x_farming:carrot", "group:food_onion", "x_farming:beetroot"},
  59. {"", "sandwiches:bread_slice", ""},
  60. },
  61. })
  62. minetest.register_craft({
  63. output = "sandwiches:banana_and_chocolate_sandwich",
  64. recipe = {
  65. {"", "sandwiches:bread_slice", ""},
  66. {"group:food_banana", "x_farming:chocolate", "group:food_banana"},
  67. {"", "sandwiches:bread_slice", ""},
  68. },
  69. })
  70. -- NON SANDWICH CRAFTS --
  71. local herb = "group:food_parsley"
  72. local rosm = "group:food_pepper_ground"
  73. if sandwiches.ingredient_support.herbs then
  74. herb = "potted_farming:sage"
  75. rosm = "group:food_rosemary"
  76. end
  77. minetest.register_craft({
  78. output = "sandwiches:roasted_potatoes 5",
  79. type = "shapeless",
  80. recipe = {
  81. "x_farming:potato", "x_farming:potato",
  82. "group:food_skillet", "group:food_oil", rosm,
  83. },
  84. replacements = {
  85. {"group:food_skillet", skillet },
  86. {"group:food_pepper_ground", "vessels:glass_bottle"},
  87. {"group:food_oil", "vessels:glass_bottle"}, }
  88. })
  89. minetest.register_craft({
  90. output = "sandwiches:butter_carrots 5",
  91. type = "shapeless",
  92. recipe = {
  93. "x_farming:carrot", "x_farming:carrot",
  94. "group:food_skillet", "group:food_butter", herb,
  95. },
  96. replacements = {{"group:food_skillet", skillet }}
  97. })
  98. minetest.register_craft({
  99. output = "sandwiches:strawberry_jam 5",
  100. recipe = {
  101. {"x_farming:strawberry", "group:food_sugar", "x_farming:strawberry"},
  102. {"group:food_sugar", "group:food_pot", "group:food_sugar"},
  103. {"x_farming:strawberry", "group:food_sugar", "x_farming:strawberry"},
  104. },
  105. replacements = {{"group:food_pot", pot }},
  106. })
  107. minetest.register_craft({
  108. output = "sandwiches:strawberry_jam 5",
  109. recipe = {
  110. {"x_farming:strawberry", "x_farming:sugar", "x_farming:strawberry"},
  111. {"x_farming:sugar", "group:food_pot", "x_farming:sugar"},
  112. {"x_farming:strawberry", "x_farming:sugar", "x_farming:strawberry"},
  113. },
  114. replacements = {{"group:food_pot", pot }},
  115. })