food.lua 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315
  1. local register_food = hunger.register_food
  2. register_food("basictrees:tree_apple", 2)
  3. if minetest.get_modpath("farming") ~= nil then
  4. register_food("farming:bread", 4)
  5. end
  6. if minetest.get_modpath("flowers") ~= nil then
  7. register_food("flowers:mushroom_brown", 1)
  8. -- Mushroom poisoning is handled in the flowers mod.
  9. --register_food("flowers:mushroom_red", 1, "", 3)
  10. end
  11. if minetest.get_modpath("mobs") ~= nil then
  12. if mobs.mod ~= nil and mobs.mod == "redo" then
  13. register_food("mobs:cheese", 4)
  14. register_food("mobs:meat", 8)
  15. register_food("mobs:meat_raw", 4)
  16. register_food("mobs:rat_cooked", 4)
  17. register_food("mobs:honey", 2)
  18. register_food("mobs:pork_raw", 3, "", 3)
  19. register_food("mobs:pork_cooked", 8)
  20. register_food("mobs:chicken_cooked", 6)
  21. register_food("mobs:chicken_raw", 2, "", 3)
  22. register_food("mobs:chicken_egg_fried", 2)
  23. if minetest.get_modpath("bucket") then
  24. register_food("mobs:bucket_milk", 3, "bucket:bucket_empty")
  25. end
  26. else
  27. register_food("mobs:meat", 6)
  28. register_food("mobs:meat_raw", 3)
  29. register_food("mobs:rat_cooked", 5)
  30. end
  31. end
  32. if minetest.get_modpath("moretrees") ~= nil then
  33. register_food("moretrees:coconut_milk", 1)
  34. register_food("moretrees:raw_coconut", 2)
  35. register_food("moretrees:acorn_muffin", 3)
  36. register_food("moretrees:spruce_nuts", 1)
  37. register_food("moretrees:pine_nuts", 1)
  38. register_food("moretrees:fir_nuts", 1)
  39. end
  40. if minetest.get_modpath("dwarves") ~= nil then
  41. register_food("dwarves:beer", 2)
  42. register_food("dwarves:apple_cider", 1)
  43. register_food("dwarves:midus", 2)
  44. register_food("dwarves:tequila", 2)
  45. register_food("dwarves:tequila_with_lime", 2)
  46. register_food("dwarves:sake", 2)
  47. end
  48. if minetest.get_modpath("animalmaterials") ~= nil then
  49. register_food("animalmaterials:milk", 2)
  50. register_food("animalmaterials:meat_raw", 3)
  51. register_food("animalmaterials:meat_pork", 3)
  52. register_food("animalmaterials:meat_beef", 3)
  53. register_food("animalmaterials:meat_chicken", 3)
  54. register_food("animalmaterials:meat_lamb", 3)
  55. register_food("animalmaterials:meat_venison", 3)
  56. register_food("animalmaterials:meat_undead", 3, "", 3)
  57. register_food("animalmaterials:meat_toxic", 3, "", 5)
  58. register_food("animalmaterials:meat_ostrich", 3)
  59. register_food("animalmaterials:fish_bluewhite", 2)
  60. register_food("animalmaterials:fish_clownfish", 2)
  61. end
  62. if minetest.get_modpath("fishing") ~= nil then
  63. register_food("fishing:fish_raw", 2)
  64. register_food("fishing:fish_cooked", 5)
  65. register_food("fishing:sushi", 6)
  66. register_food("fishing:shark", 4)
  67. register_food("fishing:shark_cooked", 8)
  68. register_food("fishing:pike", 4)
  69. register_food("fishing:pike_cooked", 8)
  70. end
  71. if minetest.get_modpath("glooptest") ~= nil then
  72. register_food("glooptest:kalite_lump", 1)
  73. end
  74. if minetest.get_modpath("bushes") ~= nil then
  75. register_food("bushes:sugar", 1)
  76. register_food("bushes:strawberry", 2)
  77. register_food("bushes:berry_pie_raw", 3)
  78. register_food("bushes:berry_pie_cooked", 4)
  79. register_food("bushes:basket_pies", 15)
  80. end
  81. if minetest.get_modpath("bushes_classic") then
  82. -- bushes_classic mod, as found in the plantlife modpack
  83. local berries = {
  84. "strawberry",
  85. "blackberry",
  86. "blueberry",
  87. "raspberry",
  88. "gooseberry",
  89. "mixed_berry"}
  90. for _, berry in ipairs(berries) do
  91. if berry ~= "mixed_berry" then
  92. register_food("bushes:"..berry, 1)
  93. end
  94. register_food("bushes:"..berry.."_pie_raw", 2)
  95. register_food("bushes:"..berry.."_pie_cooked", 5)
  96. register_food("bushes:basket_"..berry, 15)
  97. end
  98. end
  99. if minetest.get_modpath("mushroom") ~= nil then
  100. register_food("mushroom:brown", 1)
  101. register_food("mushroom:red", 1, "", 3)
  102. -- mushroom potions: red = strong poison, brown = light restorative
  103. if minetest.get_modpath("vessels") then
  104. register_food("mushroom:brown_essence", 1, "vessels:glass_bottle", nil, 4)
  105. register_food("mushroom:poison", 1, "vessels:glass_bottle", 10)
  106. end
  107. end
  108. if minetest.get_modpath("docfarming") ~= nil then
  109. register_food("docfarming:carrot", 3)
  110. register_food("docfarming:cucumber", 2)
  111. register_food("docfarming:corn", 3)
  112. register_food("docfarming:potato", 4)
  113. register_food("docfarming:bakedpotato", 5)
  114. register_food("docfarming:raspberry", 3)
  115. end
  116. if minetest.get_modpath("farming_plus") ~= nil then
  117. register_food("farming_plus:carrot_item", 3)
  118. register_food("farming_plus:banana", 2)
  119. register_food("farming_plus:orange_item", 2)
  120. register_food("farming:pumpkin_bread", 4)
  121. register_food("farming_plus:strawberry_item", 2)
  122. register_food("farming_plus:tomato_item", 2)
  123. register_food("farming_plus:potato_item", 4)
  124. register_food("farming_plus:rhubarb_item", 2)
  125. end
  126. if minetest.get_modpath("mtfoods") ~= nil then
  127. register_food("mtfoods:dandelion_milk", 1)
  128. register_food("mtfoods:sugar", 1)
  129. register_food("mtfoods:short_bread", 4)
  130. register_food("mtfoods:cream", 1)
  131. register_food("mtfoods:chocolate", 2)
  132. register_food("mtfoods:cupcake", 2)
  133. register_food("mtfoods:strawberry_shortcake", 2)
  134. register_food("mtfoods:cake", 3)
  135. register_food("mtfoods:chocolate_cake", 3)
  136. register_food("mtfoods:carrot_cake", 3)
  137. register_food("mtfoods:pie_crust", 3)
  138. register_food("mtfoods:apple_pie", 3)
  139. register_food("mtfoods:rhubarb_pie", 2)
  140. register_food("mtfoods:banana_pie", 3)
  141. register_food("mtfoods:pumpkin_pie", 3)
  142. register_food("mtfoods:cookies", 2)
  143. register_food("mtfoods:mlt_burger", 5)
  144. register_food("mtfoods:potato_slices", 2)
  145. register_food("mtfoods:potato_chips", 3)
  146. --mtfoods:medicine
  147. register_food("mtfoods:casserole", 3)
  148. register_food("mtfoods:glass_flute", 2)
  149. register_food("mtfoods:orange_juice", 2)
  150. register_food("mtfoods:apple_juice", 2)
  151. register_food("mtfoods:apple_cider", 2)
  152. register_food("mtfoods:cider_rack", 2)
  153. end
  154. if minetest.get_modpath("fruit") ~= nil then
  155. register_food("fruit:apple", 2)
  156. register_food("fruit:pear", 2)
  157. register_food("fruit:bananna", 3)
  158. register_food("fruit:orange", 2)
  159. end
  160. if minetest.get_modpath("mush45") ~= nil then
  161. register_food("mush45:meal", 4)
  162. end
  163. if minetest.get_modpath("seaplants") ~= nil then
  164. register_food("seaplants:kelpgreen", 1)
  165. register_food("seaplants:kelpbrown", 1)
  166. register_food("seaplants:seagrassgreen", 1)
  167. register_food("seaplants:seagrassred", 1)
  168. register_food("seaplants:seasaladmix", 6)
  169. register_food("seaplants:kelpgreensalad", 1)
  170. register_food("seaplants:kelpbrownsalad", 1)
  171. register_food("seaplants:seagrassgreensalad", 1)
  172. register_food("seaplants:seagrassgreensalad", 1)
  173. end
  174. if minetest.get_modpath("mobfcooking") ~= nil then
  175. register_food("mobfcooking:cooked_pork", 6)
  176. register_food("mobfcooking:cooked_ostrich", 6)
  177. register_food("mobfcooking:cooked_beef", 6)
  178. register_food("mobfcooking:cooked_chicken", 6)
  179. register_food("mobfcooking:cooked_lamb", 6)
  180. register_food("mobfcooking:cooked_venison", 6)
  181. register_food("mobfcooking:cooked_fish", 6)
  182. end
  183. if minetest.get_modpath("creatures") ~= nil then
  184. register_food("creatures:meat", 6)
  185. register_food("creatures:flesh", 3)
  186. register_food("creatures:rotten_flesh", 3, "", 3)
  187. end
  188. if minetest.get_modpath("ethereal") then
  189. register_food("ethereal:strawberry", 1)
  190. register_food("ethereal:banana", 4)
  191. register_food("ethereal:pine_nuts", 1)
  192. register_food("ethereal:bamboo_sprout", 0, "", 3)
  193. register_food("ethereal:fern_tubers", 1)
  194. register_food("ethereal:banana_bread", 7)
  195. register_food("ethereal:mushroom_plant", 2)
  196. register_food("ethereal:coconut_slice", 2)
  197. register_food("ethereal:golden_apple", 4, "", nil, 10)
  198. register_food("ethereal:wild_onion_plant", 2)
  199. register_food("ethereal:mushroom_soup", 4, "ethereal:bowl")
  200. register_food("ethereal:mushroom_soup_cooked", 6, "ethereal:bowl")
  201. register_food("ethereal:hearty_stew", 6, "ethereal:bowl", 3)
  202. register_food("ethereal:hearty_stew_cooked", 10, "ethereal:bowl")
  203. if minetest.get_modpath("bucket") then
  204. register_food("ethereal:bucket_cactus", 2, "bucket:bucket_empty")
  205. end
  206. register_food("ethereal:fish_raw", 2)
  207. register_food("ethereal:fish_cooked", 5)
  208. register_food("ethereal:seaweed", 1)
  209. register_food("ethereal:yellowleaves", 1, "", nil, 1)
  210. register_food("ethereal:sashimi", 4)
  211. end
  212. if minetest.get_modpath("farming") and farming.mod == "redo" then
  213. register_food("farming:bread", 6)
  214. register_food("farming:potato", 1)
  215. register_food("farming:baked_potato", 6)
  216. register_food("farming:cucumber", 4)
  217. register_food("farming:tomato", 4)
  218. register_food("farming:carrot", 3)
  219. register_food("farming:carrot_gold", 6, "", nil, 8)
  220. register_food("farming:corn", 3)
  221. register_food("farming:corn_cob", 5)
  222. register_food("farming:melon_slice", 2)
  223. register_food("farming:pumpkin_slice", 1)
  224. register_food("farming:pumpkin_bread", 9)
  225. register_food("farming:coffee_cup", 2, "farming:drinking_cup")
  226. register_food("farming:coffee_cup_hot", 3, "farming:drinking_cup", nil, 2)
  227. register_food("farming:cookie", 2)
  228. register_food("farming:chocolate_dark", 3)
  229. register_food("farming:donut", 4)
  230. register_food("farming:donut_chocolate", 6)
  231. register_food("farming:donut_apple", 6)
  232. register_food("farming:raspberries", 1)
  233. register_food("farming:blueberries", 1)
  234. register_food("farming:muffin_blueberry", 4)
  235. if minetest.get_modpath("vessels") then
  236. register_food("farming:smoothie_raspberry", 2, "vessels:drinking_glass")
  237. end
  238. register_food("farming:rhubarb", 1)
  239. register_food("farming:rhubarb_pie", 6)
  240. register_food("farming:beans", 1)
  241. end
  242. if minetest.get_modpath("kpgmobs") ~= nil then
  243. register_food("kpgmobs:uley", 3)
  244. register_food("kpgmobs:meat", 6)
  245. register_food("kpgmobs:rat_cooked", 5)
  246. register_food("kpgmobs:med_cooked", 4)
  247. if minetest.get_modpath("bucket") then
  248. register_food("kpgmobs:bucket_milk", 4, "bucket:bucket_empty")
  249. end
  250. end
  251. if minetest.get_modpath("jkfarming") ~= nil then
  252. register_food("jkfarming:carrot", 3)
  253. register_food("jkfarming:corn", 3)
  254. register_food("jkfarming:melon_part", 2)
  255. register_food("jkfarming:cake", 3)
  256. end
  257. if minetest.get_modpath("jkanimals") ~= nil then
  258. register_food("jkanimals:meat", 6)
  259. end
  260. if minetest.get_modpath("jkwine") ~= nil then
  261. register_food("jkwine:grapes", 2)
  262. register_food("jkwine:winebottle", 1)
  263. end
  264. if minetest.get_modpath("cooking") ~= nil then
  265. register_food("cooking:meat_beef_cooked", 4)
  266. register_food("cooking:fish_bluewhite_cooked", 3)
  267. register_food("cooking:fish_clownfish_cooked", 1)
  268. register_food("cooking:meat_chicken_cooked", 2)
  269. register_food("cooking:meat_cooked", 2)
  270. register_food("cooking:meat_pork_cooked", 3)
  271. register_food("cooking:meat_toxic_cooked", -3)
  272. register_food("cooking:meat_venison_cooked", 3)
  273. register_food("cooking:meat_undead_cooked", 1)
  274. end
  275. -- ferns mod of plantlife_modpack
  276. if minetest.get_modpath("ferns") ~= nil then
  277. register_food("ferns:fiddlehead", 1, "", 1)
  278. register_food("ferns:fiddlehead_roasted", 3)
  279. register_food("ferns:ferntuber_roasted", 3)
  280. register_food("ferns:horsetail_01", 1)
  281. end
  282. if minetest.get_modpath("pizza") ~= nil then
  283. register_food("pizza:pizza", 30, "", nil, 30)
  284. register_food("pizza:pizzaslice", 5, "", nil, 5)
  285. end