init.lua 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449
  1. minetest.register_craftitem(":farming:bread_slice", {
  2. description = "Sliced Bread",
  3. inventory_image = "farming_bread_slice.png",
  4. on_use = minetest.item_eat(1),
  5. groups = {food_bread_slice = 1, flammable = 2},
  6. })
  7. minetest.register_craft({
  8. type = "shapeless",
  9. output = "farming:bread_slice 5",
  10. recipe = {"farming:bread", "farming:cutting_board"},
  11. replacements = {{"farming:cutting_board", "farming:cutting_board"}},
  12. })
  13. -- mortar & pestle uses only 2 wheat to make flour, contast with hand-craft which uses 4 wheat for 1 flour
  14. minetest.register_craft({
  15. type = "shapeless",
  16. output = "farming:flour",
  17. recipe = {
  18. "farming:wheat", "farming:wheat",
  19. "farming:mortar_pestle"
  20. },
  21. replacements = {{"farming:mortar_pestle", "farming:mortar_pestle"}},
  22. })
  23. minetest.register_craftitem(":farming:toast", {
  24. description = "Toast",
  25. inventory_image = "farming_toast.png",
  26. on_use = minetest.item_eat(1),
  27. groups = {food_toast = 1, flammable = 2},
  28. })
  29. minetest.register_craftitem(":farming:toast_sandwich", {
  30. description = "Toast Sandwich",
  31. inventory_image = "farming_toast_sandwich.png",
  32. on_use = minetest.item_eat(4),
  33. groups = {flammable = 2},
  34. })
  35. minetest.register_craft({
  36. output = "farming:toast_sandwich",
  37. recipe = {
  38. {"farming:bread_slice"},
  39. {"farming:toast"},
  40. {"farming:bread_slice"},
  41. }
  42. })
  43. --tomato sandwich
  44. minetest.register_craftitem(":farming:tomato_sandwich", {
  45. description = "Toasted Tomato Sandwich",
  46. inventory_image = "farming_toasted_tomato_sandwich.png",
  47. on_use = minetest.item_eat(6),
  48. groups = {flammable = 2},
  49. })
  50. minetest.register_craft({
  51. output = "farming:tomato_sandwich",
  52. recipe = {
  53. {"farming:flour"},
  54. {"tomato:tomato"},
  55. {"farming:sugar"},
  56. }
  57. })
  58. -- carrot cake
  59. local eat_carrot_cake = minetest.item_eat(4)
  60. minetest.register_craftitem(":farming:carrot_cake", {
  61. description = "Carrot Cake\n\nImproves health regeneration for a period of time.",
  62. inventory_image = "farming_carrot_cake.png",
  63. groups = {flammable = 2},
  64. on_use = function(itemstack, user, pointed_thing)
  65. if not user or not user:is_player() then return end
  66. -- 2 times (200%) faster than normal.
  67. hunger.apply_hpgen_boost(user:get_player_name(), "cake", {regen=2, time=(HUNGER_HEALTH_TICK * 10)})
  68. return eat_carrot_cake(itemstack, user, pointed_thing)
  69. end,
  70. })
  71. minetest.register_craft({
  72. output = "farming:carrot_cake",
  73. type = "shapeless",
  74. recipe = {
  75. "farming:flour", "farming:sugar",
  76. "carrot:regular", "carrot:regular", "carrot:regular",
  77. "farming:baking_tray"
  78. },
  79. replacements = {{"farming:baking_tray", "farming:baking_tray"}}
  80. })
  81. minetest.register_craft({
  82. type = "fuel",
  83. recipe = "farming:straw",
  84. burntime = 3,
  85. })
  86. minetest.register_craft({
  87. type = "fuel",
  88. recipe = "farming:straw_weathered",
  89. burntime = 3,
  90. })
  91. minetest.register_craft({
  92. type = "fuel",
  93. recipe = "darkage:straw_bale",
  94. burntime = 3*9,
  95. })
  96. minetest.register_craft({
  97. type = "fuel",
  98. recipe = "farming:wheat",
  99. burntime = 1,
  100. })
  101. minetest.register_craft({
  102. type = "cooking",
  103. cooktime = 3,
  104. output = "farming:toast",
  105. recipe = "farming:bread_slice"
  106. })
  107. minetest.register_craftitem(":farming:cutting_board", {
  108. description = "Cutting Board",
  109. inventory_image = "farming_cutting_board.png",
  110. groups = {food_cutting_board = 1, flammable = 2},
  111. })
  112. minetest.register_craft({
  113. output = "farming:cutting_board",
  114. recipe = {
  115. {"default:steel_ingot", "", ""},
  116. {"", "group:stick", ""},
  117. {"", "", "group:wood"},
  118. }
  119. })
  120. minetest.register_craftitem(":farming:saucepan", {
  121. description = "Saucepan",
  122. inventory_image = "farming_saucepan.png",
  123. groups = {food_saucepan = 1, flammable = 2},
  124. })
  125. minetest.register_craft({
  126. output = "farming:saucepan",
  127. recipe = {
  128. {"default:steel_ingot", "", ""},
  129. {"", "group:stick", ""},
  130. }
  131. })
  132. minetest.register_craftitem(":farming:pot", {
  133. description = "Cooking Pot",
  134. inventory_image = "farming_pot.png",
  135. groups = {food_pot = 1, flammable = 2},
  136. })
  137. minetest.register_craft({
  138. output = "farming:pot",
  139. recipe = {
  140. {"group:stick", "default:steel_ingot", "default:steel_ingot"},
  141. {"", "default:steel_ingot", "default:steel_ingot"},
  142. }
  143. })
  144. minetest.register_craftitem(":farming:baking_tray", {
  145. description = "Baking Tray",
  146. inventory_image = "farming_baking_tray.png",
  147. groups = {food_baking_tray = 1, flammable = 2},
  148. })
  149. minetest.register_craft({
  150. output = "farming:baking_tray",
  151. recipe = {
  152. {"default:clay_brick", "default:clay_brick", "default:clay_brick"},
  153. {"default:clay_brick", "", "default:clay_brick"},
  154. {"default:clay_brick", "default:clay_brick", "default:clay_brick"},
  155. }
  156. })
  157. minetest.register_craftitem(":farming:skillet", {
  158. description = "Skillet",
  159. inventory_image = "farming_skillet.png",
  160. groups = {food_skillet = 1, flammable = 2},
  161. })
  162. minetest.register_craft({
  163. output = "farming:skillet",
  164. recipe = {
  165. {"default:steel_ingot", "", ""},
  166. {"", "default:steel_ingot", ""},
  167. {"", "", "group:stick"},
  168. }
  169. })
  170. minetest.register_craftitem(":farming:mortar_pestle", {
  171. description = "Mortar and Pestle",
  172. inventory_image = "farming_mortar_pestle.png",
  173. groups = {food_mortar_pestle = 1, flammable = 2},
  174. })
  175. minetest.register_craft({
  176. output = "farming:mortar_pestle",
  177. recipe = {
  178. {"default:stone", "group:stick", "default:stone"},
  179. {"", "default:stone", ""},
  180. }
  181. })
  182. minetest.register_craftitem(":farming:juicer", {
  183. description = "Juicer",
  184. inventory_image = "farming_juicer.png",
  185. groups = {food_juicer = 1, flammable = 2},
  186. })
  187. minetest.register_craft({
  188. output = "farming:juicer",
  189. recipe = {
  190. {"", "default:stone", ""},
  191. {"default:stone", "", "default:stone"},
  192. }
  193. })
  194. minetest.register_craftitem(":farming:mixing_bowl", {
  195. description = "Glass Mixing Bowl",
  196. inventory_image = "farming_mixing_bowl.png",
  197. groups = {food_mixing_bowl = 1, flammable = 2},
  198. })
  199. minetest.register_craft({
  200. output = "farming:mixing_bowl",
  201. recipe = {
  202. {"default:glass", "group:stick", "default:glass"},
  203. {"", "default:glass", ""},
  204. }
  205. })
  206. minetest.register_craft( {
  207. type = "shapeless",
  208. output = "vessels:glass_fragments",
  209. recipe = {
  210. "farming:mixing_bowl",
  211. },
  212. })
  213. minetest.register_craftitem(":farming:sugar", {
  214. description = "Sugar",
  215. inventory_image = "farming_sugar.png",
  216. groups = {food_sugar = 1, flammable = 3},
  217. })
  218. minetest.register_craft({
  219. type = "cooking",
  220. cooktime = 3,
  221. output = "farming:sugar 2",
  222. recipe = "default:papyrus",
  223. })
  224. minetest.register_craftitem(":farming:blueberry_pie", {
  225. description = "Blueberry Pie",
  226. inventory_image = "farming_blueberry_pie.png",
  227. on_use = minetest.item_eat(6),
  228. })
  229. minetest.register_craft({
  230. output = "farming:blueberry_pie",
  231. type = "shapeless",
  232. recipe = {
  233. "farming:flour", "farming:sugar",
  234. "blueberries:fruit", "farming:baking_tray"
  235. },
  236. replacements = {{"farming:baking_tray", "farming:baking_tray"}}
  237. })
  238. minetest.register_craftitem(":farming:apple_pie", {
  239. description = "Apple Pie",
  240. inventory_image = "farming_apple_pie.png",
  241. on_use = minetest.item_eat(6),
  242. })
  243. minetest.register_craft({
  244. output = "farming:apple_pie",
  245. type = "shapeless",
  246. recipe = {
  247. "farming:flour", "farming:sugar",
  248. "basictrees:tree_apple", "farming:baking_tray"
  249. },
  250. replacements = {{"farming:baking_tray", "farming:baking_tray"}}
  251. })
  252. minetest.register_node(":farming:salt", {
  253. description = "Salt",
  254. inventory_image = "farming_salt.png",
  255. wield_image = "farming_salt.png",
  256. drawtype = "plantlike",
  257. visual_scale = 0.8,
  258. paramtype = "light",
  259. tiles = {"farming_salt.png"},
  260. groups = {food_salt = 1, vessel = 1, dig_immediate = 3, attached_node = 1},
  261. sounds = default.node_sound_defaults(),
  262. selection_box = {
  263. type = "fixed",
  264. fixed = {-0.25, -0.5, -0.25, 0.25, 0.3, 0.25}
  265. },
  266. walkable = false,
  267. })
  268. minetest.register_craft({
  269. type = "cooking",
  270. cooktime = 15,
  271. output = "farming:salt",
  272. recipe = "bucket:bucket_water",
  273. replacements = {{"bucket:bucket_water", "bucket:bucket_empty"}}
  274. })
  275. minetest.register_craft({
  276. type = "cooking",
  277. cooktime = 15,
  278. output = "farming:salt",
  279. recipe = "bucket:bucket_river_water",
  280. replacements = {{"bucket:bucket_river_water", "bucket:bucket_empty"}}
  281. })
  282. local eat_function = minetest.item_eat(4, "vessels:drinking_glass")
  283. minetest.register_craftitem(":farming:carrot_juice", {
  284. description = "Carrot Juice\n\nIncreases stamina regen for a time.",
  285. inventory_image = "farming_carrot_juice.png",
  286. on_use = function(itemstack, user, pointed_thing)
  287. if not user or not user:is_player() then return end
  288. hunger.apply_stamina_boost(user:get_player_name(), "drink", {regen=1.5, time=30})
  289. return eat_function(itemstack, user, pointed_thing)
  290. end,
  291. groups = {vessel = 1},
  292. })
  293. minetest.register_craft({
  294. output = "farming:carrot_juice",
  295. type = "shapeless",
  296. recipe = {
  297. "vessels:drinking_glass", "carrot:regular", "farming:juicer"
  298. },
  299. replacements = {
  300. {"farming:juicer", "farming:juicer"},
  301. },
  302. })
  303. minetest.register_node(":farming:rose_water", {
  304. description = "Rose Water",
  305. inventory_image = "farming_rose_water.png",
  306. wield_image = "farming_rose_water.png",
  307. drawtype = "plantlike",
  308. visual_scale = 0.8,
  309. paramtype = "light",
  310. tiles = {"farming_rose_water.png"},
  311. groups = {food_rose_water = 1, vessel = 1, dig_immediate = 3, attached_node = 1},
  312. sounds = default.node_sound_defaults(),
  313. selection_box = {
  314. type = "fixed",
  315. fixed = {-0.25, -0.5, -0.25, 0.25, 0.3, 0.25}
  316. },
  317. walkable = false,
  318. })
  319. minetest.register_craft({
  320. output = "farming:rose_water",
  321. recipe = {
  322. {"flowers:rose", "flowers:rose", "flowers:rose"},
  323. {"flowers:rose", "flowers:rose", "flowers:rose"},
  324. {"bucket:bucket_water", "farming:pot", "vessels:glass_bottle"},
  325. },
  326. replacements = {
  327. {"bucket:bucket_water", "bucket:bucket_empty"},
  328. {"farming:pot", "farming:pot"},
  329. }
  330. })
  331. minetest.register_craft({
  332. output = "farming:rose_water",
  333. recipe = {
  334. {"flowers:rose_white", "flowers:rose_white", "flowers:rose_white"},
  335. {"flowers:rose_white", "flowers:rose_white", "flowers:rose_white"},
  336. {"bucket:bucket_water", "farming:pot", "vessels:glass_bottle"},
  337. },
  338. replacements = {
  339. {"bucket:bucket_water", "bucket:bucket_empty"},
  340. {"farming:pot", "farming:pot"},
  341. }
  342. })
  343. minetest.register_node(":farming:scarecrow_bottom", {
  344. description = "Scarecrow ... Thing",
  345. paramtype = "light",
  346. sunlight_propagates = true,
  347. paramtype2 = "facedir",
  348. tiles = {"default_wood.png"},
  349. drawtype = "nodebox",
  350. node_box = {
  351. type = "fixed",
  352. fixed = {
  353. {-1/16, -8/16, -1/16, 1/16, 8/16, 1/16},
  354. {-12/16, 4/16, -1/16, 12/16, 2/16, 1/16},
  355. },
  356. },
  357. groups = utility.dig_groups("bigitem", {flammable = 2, attached_node = 1}),
  358. })
  359. minetest.register_craft({
  360. output = "farming:scarecrow_bottom",
  361. recipe = {
  362. {"", "group:stick", "",},
  363. {"group:stick", "group:stick", "group:stick",},
  364. {"", "group:stick", "",}
  365. }
  366. })
  367. minetest.register_craftitem(":farming:string", {
  368. description = "String",
  369. inventory_image = "farming_string.png",
  370. groups = {flammable = 2},
  371. })
  372. minetest.register_craft({
  373. output = "farming:string",
  374. recipe = {
  375. {"farming:cotton"},
  376. {"farming:cotton"},
  377. {"farming:cotton"},
  378. }
  379. })
  380. minetest.register_craft({
  381. type = "fuel",
  382. recipe = "farming:string",
  383. burntime = 1,
  384. })
  385. minetest.register_craft({
  386. type = "fuel",
  387. recipe = "farming:cotton",
  388. burntime = 1,
  389. })