You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

221 lines
5.3KB

  1. local S = farming.intllib
  2. --= Sugar
  3. minetest.register_craftitem("farming:sugar", {
  4. description = S("Sugar"),
  5. inventory_image = "farming_sugar.png",
  6. groups = {food_sugar = 1, flammable = 3},
  7. })
  8. minetest.register_craft({
  9. type = "cooking",
  10. cooktime = 3,
  11. output = "farming:sugar 2",
  12. recipe = "default:papyrus",
  13. })
  14. --= Salt
  15. minetest.register_node("farming:salt", {
  16. description = ("Salt"),
  17. inventory_image = "farming_salt.png",
  18. wield_image = "farming_salt.png",
  19. drawtype = "plantlike",
  20. visual_scale = 0.8,
  21. paramtype = "light",
  22. tiles = {"farming_salt.png"},
  23. groups = {food_salt = 1, vessel = 1, dig_immediate = 3,
  24. attached_node = 1},
  25. sounds = default.node_sound_defaults(),
  26. selection_box = {
  27. type = "fixed",
  28. fixed = {-0.25, -0.5, -0.25, 0.25, 0.3, 0.25}
  29. },
  30. })
  31. minetest.register_craft({
  32. type = "cooking",
  33. cooktime = 15,
  34. output = "farming:salt",
  35. recipe = "bucket:bucket_water",
  36. replacements = {{"bucket:bucket_water", "bucket:bucket_empty"}}
  37. })
  38. --= Rose Water
  39. minetest.register_node("farming:rose_water", {
  40. description = ("Rose Water"),
  41. inventory_image = "farming_rose_water.png",
  42. wield_image = "farming_rose_water.png",
  43. drawtype = "plantlike",
  44. visual_scale = 0.8,
  45. paramtype = "light",
  46. tiles = {"farming_rose_water.png"},
  47. groups = {food_rose_water = 1, vessel = 1, dig_immediate = 3,
  48. attached_node = 1},
  49. sounds = default.node_sound_defaults(),
  50. selection_box = {
  51. type = "fixed",
  52. fixed = {-0.25, -0.5, -0.25, 0.25, 0.3, 0.25}
  53. },
  54. })
  55. minetest.register_craft({
  56. output = "farming:rose_water",
  57. recipe = {
  58. {"flowers:rose", "flowers:rose", "flowers:rose"},
  59. {"flowers:rose", "flowers:rose", "flowers:rose"},
  60. {"bucket:bucket_water", "group:food_pot", "vessels:glass_bottle"},
  61. },
  62. replacements = {
  63. {"bucket:bucket_water", "bucket:bucket_empty"},
  64. {"group:food_pot", "farming:pot"},
  65. }
  66. })
  67. --= Turkish Delight
  68. minetest.register_craftitem("farming:turkish_delight", {
  69. description = S("Turkish Delight"),
  70. inventory_image = "farming_turkish_delight.png",
  71. groups = {flammable = 3},
  72. on_use = minetest.item_eat(2),
  73. })
  74. minetest.register_craft({
  75. output = "farming:turkish_delight 4",
  76. recipe = {
  77. {"group:food_gelatin", "group:food_sugar", "group:food_gelatin"},
  78. {"group:food_sugar", "group:food_rose_water", "group:food_sugar"},
  79. {"group:food_cornstarch", "group:food_sugar", "dye:pink"},
  80. },
  81. replacements = {
  82. {"group:food_cornstarch", "farming:bowl"},
  83. {"group:food_rose_water", "vessels:glass_bottle"},
  84. },
  85. })
  86. --= Garlic Bread
  87. minetest.register_craftitem("farming:garlic_bread", {
  88. description = S("Garlic Bread"),
  89. inventory_image = "farming_garlic_bread.png",
  90. groups = {flammable = 3},
  91. on_use = minetest.item_eat(2),
  92. })
  93. minetest.register_craft({
  94. type = "shapeless",
  95. output = "farming:garlic_bread",
  96. recipe = {"group:food_toast", "group:food_garlic_clove", "group:food_garlic_clove"},
  97. })
  98. --= Donuts (thanks to Bockwurst for making the donut images)
  99. minetest.register_craftitem("farming:donut", {
  100. description = S("Donut"),
  101. inventory_image = "farming_donut.png",
  102. on_use = minetest.item_eat(4),
  103. })
  104. minetest.register_craft({
  105. output = "farming:donut 3",
  106. recipe = {
  107. {"", "group:food_wheat", ""},
  108. {"group:food_wheat", "group:food_sugar", "group:food_wheat"},
  109. {"", "group:food_wheat", ""},
  110. }
  111. })
  112. minetest.register_craftitem("farming:donut_chocolate", {
  113. description = S("Chocolate Donut"),
  114. inventory_image = "farming_donut_chocolate.png",
  115. on_use = minetest.item_eat(6),
  116. })
  117. minetest.register_craft({
  118. output = "farming:donut_chocolate",
  119. recipe = {
  120. {"group:food_cocoa"},
  121. {"farming:donut"},
  122. }
  123. })
  124. minetest.register_craftitem("farming:donut_apple", {
  125. description = S("Apple Donut"),
  126. inventory_image = "farming_donut_apple.png",
  127. on_use = minetest.item_eat(6),
  128. })
  129. minetest.register_craft({
  130. output = "farming:donut_apple",
  131. recipe = {
  132. {"default:apple"},
  133. {"farming:donut"},
  134. }
  135. })
  136. --= Porridge Oats
  137. minetest.register_craftitem("farming:porridge", {
  138. description = S("Porridge"),
  139. inventory_image = "farming_porridge.png",
  140. on_use = minetest.item_eat(6, "farming:bowl"),
  141. })
  142. minetest.after(0, function()
  143. local fluid = "bucket:bucket_water"
  144. local fluid_return = "bucket:bucket_water"
  145. if minetest.get_modpath("mobs") and mobs and mobs.mod == "redo" then
  146. fluid = "group:food_milk"
  147. fluid_return = "mobs:bucket_milk"
  148. end
  149. minetest.register_craft({
  150. type = "shapeless",
  151. output = "farming:porridge",
  152. recipe = {
  153. "group:food_barley", "group:food_barley", "group:food_wheat",
  154. "group:food_wheat", "group:food_bowl", fluid
  155. },
  156. replacements = {{fluid_return, "bucket:bucket_empty"}}
  157. })
  158. minetest.register_craft({
  159. type = "shapeless",
  160. output = "farming:porridge",
  161. recipe = {
  162. "group:food_oats", "group:food_oats", "group:food_oats",
  163. "group:food_oats", "group:food_bowl", fluid
  164. },
  165. replacements = {{fluid_return, "bucket:bucket_empty"}}
  166. })
  167. end)
  168. --= Jaffa Cake
  169. minetest.register_craftitem("farming:jaffa_cake", {
  170. description = S("Jaffa Cake"),
  171. inventory_image = "farming_jaffa_cake.png",
  172. on_use = minetest.item_eat(6),
  173. })
  174. minetest.register_craft({
  175. type = "shapeless",
  176. output = "farming:jaffa_cake",
  177. recipe = {
  178. "farming:baking_tray", "group:food_egg", "group:food_sugar",
  179. "group:food_flour", "group:food_cocoa", "group:food_orange",
  180. "group:food_milk"
  181. },
  182. replacements = {
  183. {"farming:baking_tray", "farming:baking_tray"},
  184. {"mobs:bucket_milk", "bucket:bucket_empty"}
  185. }
  186. })