food.lua 9.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368
  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. })
  187. -- Tomato sauce
  188. minetest.register_craftitem("farming:tomato_sauce", {
  189. description = S("Tomato Sauce"),
  190. inventory_image = "farming_tomato_sauce.png",
  191. on_use = minetest.item_eat(3, "farming:saucepan"),
  192. })
  193. minetest.register_craft({
  194. type = "shapeless",
  195. output = "farming:tomato_sauce",
  196. recipe = {
  197. "group:food_tomato",
  198. "group:food_tomato",
  199. "group:food_tomato",
  200. "group:food_saucepan"},
  201. })
  202. -- Pizza
  203. minetest.register_craftitem("farming:pizza_unbaked", {
  204. description = S("Unbaked Pizza"),
  205. inventory_image = "farming_pizza_unbaked.png",
  206. on_use = minetest.item_eat(2),
  207. })
  208. minetest.register_craft({
  209. output = "farming:pizza_unbaked",
  210. recipe = {
  211. {"group:food_cheese"},
  212. {"farming:tomato_sauce"},
  213. {"group:food_flour"},
  214. },
  215. replacements = {{"farming:tomato_sauce", "farming:saucepan"}},
  216. })
  217. minetest.register_craftitem("farming:pizza", {
  218. description = S("Pizza"),
  219. inventory_image = "farming_pizza.png",
  220. on_use = minetest.item_eat(8),
  221. groups = {food_pizza = 1},
  222. })
  223. minetest.register_craft({
  224. type = "cooking",
  225. cooktime = 3,
  226. output = "farming:pizza",
  227. recipe = "farming:pizza_unbaked",
  228. })
  229. minetest.register_craftitem("farming:pizza_slice", {
  230. description = S("Pizza Slice"),
  231. inventory_image = "farming_pizza_slice.png",
  232. on_use = minetest.item_eat(2),
  233. groups = {food_pizza_slice = 1},
  234. })
  235. minetest.register_craft({
  236. type = "shapeless",
  237. output = "farming:pizza_slice 4",
  238. recipe = {"farming:cutting_board", "farming:pizza"},
  239. replacements = {{"farming:cutting_board", "farming:cutting board"}},
  240. })
  241. minetest.register_craftitem("farming:pizza_with_toppings_unbaked", {
  242. description = S("Unbaked Pizza with Toppings"),
  243. inventory_image = "farming_pizza_unbaked.png^farming_pizza_toppings.png",
  244. on_use = minetest.item_eat(3),
  245. })
  246. local pizza_toppings = {
  247. "group:food_chili_pepper",
  248. "group:food_onion",
  249. "group:food_pepper",
  250. "group:food_pineapple_ring",
  251. "group:food_tomato",
  252. "group:food_mushroom",
  253. "group:food_meat",
  254. }
  255. for _, topping in pairs(pizza_toppings) do
  256. minetest.register_craft({
  257. output = "farming:pizza_with_toppings_unbaked",
  258. recipe = {
  259. {topping},
  260. {"farming:pizza_unbaked"},
  261. },
  262. })
  263. end
  264. minetest.register_craftitem("farming:pizza_with_toppings", {
  265. description = S("Pizza with Toppings"),
  266. inventory_image = "farming_pizza.png^farming_pizza_toppings.png",
  267. on_use = minetest.item_eat(12),
  268. groups = {food_pizza = 1},
  269. })
  270. minetest.register_craft({
  271. type = "cooking",
  272. cooktime = 3,
  273. output = "farming:pizza_with_toppings",
  274. recipe = "farming:pizza_with_toppings_unbaked",
  275. })
  276. minetest.register_craftitem("farming:pizza_with_toppings_slice", {
  277. description = S("Pizza Slice with Toppings"),
  278. inventory_image = "farming_pizza_with_toppings_slice.png",
  279. on_use = minetest.item_eat(3),
  280. groups = {food_pizza_slice = 1},
  281. })
  282. minetest.register_craft({
  283. type = "shapeless",
  284. output = "farming:pizza_with_toppings_slice 4",
  285. recipe = {"farming:cutting_board", "farming:pizza_with_toppings"},
  286. replacements = {{"farming:cutting_board", "farming:cutting board"}},
  287. })
  288. -- Multigrain flour
  289. minetest.register_craftitem("farming:flour_multigrain", {
  290. description = S("Multigrain Flour"),
  291. inventory_image = "farming_flour_multigrain.png",
  292. groups = {food_flour = 1, flammable = 1},
  293. })
  294. minetest.register_craft({
  295. type = "shapeless",
  296. output = "farming:flour_multigrain",
  297. recipe = {
  298. "farming:wheat", "farming:barley", "farming:oat",
  299. "farming:rye", "farming:mortar_pestle"
  300. },
  301. replacements = {{"group:food_mortar_pestle", "farming:mortar_pestle"}},
  302. })
  303. -- Multigrain bread
  304. minetest.register_craftitem("farming:bread_multigrain", {
  305. description = S("Multigrain Bread"),
  306. inventory_image = "farming_bread_multigrain.png",
  307. on_use = minetest.item_eat(7),
  308. groups = {food_bread = 1, flammable = 2},
  309. })
  310. minetest.register_craft({
  311. type = "cooking",
  312. cooktime = 15,
  313. output = "farming:bread_multigrain",
  314. recipe = "farming:flour_multigrain"
  315. })