crafting.lua 9.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360
  1. -----------------------------------------------------------------------------------------------
  2. -- Dry Plants - Recipes 0.1.0 -- Short Grass -> Dirt
  3. -----------------------------------------------------------------------------------------------
  4. -- by Mossmanikin
  5. -- Looked at code from: darkage, default, farming, sickle, stairs
  6. -- Dependencies: default, farming
  7. -- Supports: flint, stoneage, sumpf
  8. -----------------------------------------------------------------------------------------------
  9. -----------------------------------------------------------------------------------------------
  10. -- Short Grass
  11. -----------------------------------------------------------------------------------------------
  12. minetest.register_craft({
  13. output = "default:dirt",
  14. recipe = {
  15. {"dryplants:grass_short"},
  16. }
  17. })
  18. -----------------------------------------------------------------------------------------------
  19. -- Cut Grass
  20. -----------------------------------------------------------------------------------------------
  21. -- grass recipes (remove roots)
  22. minetest.register_craft({
  23. output = "dryplants:grass",
  24. recipe = {
  25. {"default:grass_1"},
  26. }
  27. })
  28. minetest.register_craft({
  29. output = "dryplants:grass",
  30. recipe = {
  31. {"default:junglegrass"},
  32. }
  33. })
  34. if minetest.get_modpath("sumpf") ~= nil then
  35. minetest.register_craft({
  36. output = "dryplants:grass",
  37. recipe = {
  38. {"sumpf:gras"},
  39. }
  40. })
  41. end
  42. -----------------------------------------------------------------------------------------------
  43. -- Sickle
  44. -----------------------------------------------------------------------------------------------
  45. minetest.register_craft({
  46. output = "dryplants:sickle",
  47. recipe = {
  48. {"group:stone",""},
  49. {"", "default:stick"},
  50. {"default:stick",""}
  51. }
  52. })
  53. if minetest.get_modpath("flint") ~= nil then
  54. minetest.register_craft({
  55. output = "dryplants:sickle",
  56. recipe = {
  57. {"flint:flintstone",""},
  58. {"", "default:stick"},
  59. {"default:stick",""}
  60. }
  61. })
  62. end
  63. if minetest.get_modpath("stoneage") ~= nil then
  64. minetest.register_craft({
  65. output = "dryplants:sickle",
  66. recipe = {
  67. {"stoneage:silex",""},
  68. {"", "default:stick"},
  69. {"default:stick",""}
  70. }
  71. })
  72. end
  73. -----------------------------------------------------------------------------------------------
  74. -- Hay
  75. -----------------------------------------------------------------------------------------------
  76. --cooking
  77. minetest.register_craft({
  78. type = "cooking",
  79. output = "dryplants:hay",
  80. recipe = "dryplants:grass",
  81. cooktime = 2,
  82. })
  83. minetest.register_craft({
  84. type = "fuel",
  85. recipe = "dryplants:hay",
  86. burntime = 1,
  87. })
  88. -----------------------------------------------------------------------------------------------
  89. -- Wet Reed
  90. -----------------------------------------------------------------------------------------------
  91. minetest.register_craft({ -- papyrus -> wetreed
  92. output = "dryplants:wetreed 2",
  93. recipe = {
  94. {"default:papyrus","default:papyrus"},
  95. {"default:papyrus","default:papyrus"},
  96. }
  97. })
  98. minetest.register_craft({ -- reedmace_sapling -> wetreed
  99. output = "dryplants:wetreed 2",
  100. recipe = {
  101. {"dryplants:reedmace_sapling","dryplants:reedmace_sapling"},
  102. {"dryplants:reedmace_sapling","dryplants:reedmace_sapling"},
  103. }
  104. })
  105. minetest.register_craft({ -- reedmace_top -> wetreed
  106. output = "dryplants:wetreed 2",
  107. recipe = {
  108. {"dryplants:reedmace_top","dryplants:reedmace_top"},
  109. {"dryplants:reedmace_top","dryplants:reedmace_top"},
  110. }
  111. })
  112. minetest.register_craft({ -- reedmace -> wetreed
  113. output = "dryplants:wetreed 2",
  114. recipe = {
  115. {"dryplants:reedmace","dryplants:reedmace"},
  116. {"dryplants:reedmace","dryplants:reedmace"},
  117. }
  118. })
  119. minetest.register_craft({ -- reedmace_bottom -> wetreed
  120. output = "dryplants:wetreed 2",
  121. recipe = {
  122. {"dryplants:reedmace_bottom","dryplants:reedmace_bottom"},
  123. {"dryplants:reedmace_bottom","dryplants:reedmace_bottom"},
  124. }
  125. })
  126. local ReeD = {
  127. {"wetreed"},
  128. {"reed"}
  129. }
  130. for i in pairs(ReeD) do
  131. local reed = "dryplants:"..ReeD[i][1]
  132. local slab = reed.."_slab"
  133. local roof = reed.."_roof"
  134. local corner = roof.."_corner"
  135. local corner_2 = corner.."_2"
  136. -----------------------------------------------------------------------------------------------
  137. -- Block
  138. -----------------------------------------------------------------------------------------------
  139. minetest.register_craft({ -- slab -> block
  140. output = reed,
  141. recipe = {
  142. {slab},
  143. {slab},
  144. }
  145. })
  146. minetest.register_craft({ -- roof -> block
  147. output = reed,
  148. recipe = {
  149. {roof},
  150. {roof},
  151. }
  152. })
  153. minetest.register_craft({ -- corner -> block
  154. type = "shapeless",
  155. output = reed.." 3",
  156. recipe = {corner,corner,corner,corner,corner,corner,corner,corner}, -- 8x
  157. })
  158. minetest.register_craft({ -- corner_2 -> block
  159. type = "shapeless",
  160. output = reed.." 3",
  161. recipe = {corner_2,corner_2,corner_2,corner_2,corner_2,corner_2,corner_2,corner_2}, -- 8x
  162. })
  163. -----------------------------------------------------------------------------------------------
  164. -- Slab
  165. -----------------------------------------------------------------------------------------------
  166. minetest.register_craft({ -- block -> slab
  167. output = slab.." 6",
  168. recipe = {
  169. {reed,reed,reed},
  170. }
  171. })
  172. minetest.register_craft({ -- roof -> slab
  173. output = slab,
  174. recipe = {
  175. {roof},
  176. }
  177. })
  178. minetest.register_craft({ -- corner -> slab
  179. output = slab.." 3",
  180. recipe = {
  181. {corner,corner},
  182. {corner,corner},
  183. }
  184. })
  185. minetest.register_craft({ -- corner_2 -> slab
  186. output = slab.." 3",
  187. recipe = {
  188. {corner_2,corner_2},
  189. {corner_2,corner_2},
  190. }
  191. })
  192. -----------------------------------------------------------------------------------------------
  193. -- Roof
  194. -----------------------------------------------------------------------------------------------
  195. minetest.register_craft({ -- block -> roof
  196. output = roof.." 4",
  197. recipe = {
  198. {reed,""},
  199. {"",reed},
  200. }
  201. })
  202. minetest.register_craft({ -- block -> roof
  203. output = roof.." 4",
  204. recipe = {
  205. {"",reed},
  206. {reed,""},
  207. }
  208. })
  209. minetest.register_craft({ -- slab -> roof
  210. output = roof,
  211. recipe = {
  212. {slab},
  213. }
  214. })
  215. -----------------------------------------------------------------------------------------------
  216. -- Roof Corner
  217. -----------------------------------------------------------------------------------------------
  218. minetest.register_craft({ -- block -> corner
  219. output = corner.." 8",
  220. recipe = {
  221. {"",reed,""},
  222. {reed,"",reed},
  223. }
  224. })
  225. minetest.register_craft({ -- corner_2 -> corner
  226. output = corner,
  227. recipe = {
  228. {corner_2},
  229. }
  230. })
  231. -----------------------------------------------------------------------------------------------
  232. -- Roof Corner 2
  233. -----------------------------------------------------------------------------------------------
  234. minetest.register_craft({ -- block -> corner_2
  235. output = corner_2.." 8",
  236. recipe = {
  237. {reed,"",reed},
  238. {"",reed,""},
  239. }
  240. })
  241. minetest.register_craft({ -- corner -> corner_2
  242. output = corner_2,
  243. recipe = {
  244. {corner},
  245. }
  246. })
  247. end
  248. -----------------------------------------------------------------------------------------------
  249. -- Reed
  250. -----------------------------------------------------------------------------------------------
  251. minetest.register_craft({ -- hay -> reed
  252. output = "dryplants:reed 2",
  253. recipe = {
  254. {"dryplants:hay","dryplants:hay"},
  255. {"dryplants:hay","dryplants:hay"},
  256. }
  257. })
  258. --cooking
  259. minetest.register_craft({ -- wetreed -> reed
  260. type = "cooking",
  261. output = "dryplants:reed",
  262. recipe = "dryplants:wetreed",
  263. cooktime = 2,
  264. })
  265. --fuel
  266. minetest.register_craft({
  267. type = "fuel",
  268. recipe = "dryplants:reed",
  269. burntime = 4,
  270. })
  271. -----------------------------------------------------------------------------------------------
  272. -- Reed Slab
  273. -----------------------------------------------------------------------------------------------
  274. --cooking
  275. minetest.register_craft({ -- wetreed_slab -> reed_slab
  276. type = "cooking",
  277. output = "dryplants:reed_slab",
  278. recipe = "dryplants:wetreed_slab",
  279. cooktime = 1,
  280. })
  281. --fuel
  282. minetest.register_craft({
  283. type = "fuel",
  284. recipe = "dryplants:reed_slab",
  285. burntime = 2,
  286. })
  287. -----------------------------------------------------------------------------------------------
  288. -- Reed Roof
  289. -----------------------------------------------------------------------------------------------
  290. --cooking
  291. minetest.register_craft({ -- wetreed_roof -> reed_roof
  292. type = "cooking",
  293. output = "dryplants:reed_roof",
  294. recipe = "dryplants:wetreed_roof",
  295. cooktime = 1,
  296. })
  297. --fuel
  298. minetest.register_craft({
  299. type = "fuel",
  300. recipe = "dryplants:reed_roof",
  301. burntime = 2,
  302. })
  303. -----------------------------------------------------------------------------------------------
  304. -- Reed Roof Corner
  305. -----------------------------------------------------------------------------------------------
  306. --cooking
  307. minetest.register_craft({ -- wetreed_roof_corner -> reed_roof_corner
  308. type = "cooking",
  309. output = "dryplants:reed_roof_corner",
  310. recipe = "dryplants:wetreed_roof_corner",
  311. cooktime = 1,
  312. })
  313. --fuel
  314. minetest.register_craft({
  315. type = "fuel",
  316. recipe = "dryplants:reed_roof_corner",
  317. burntime = 2,
  318. })
  319. -----------------------------------------------------------------------------------------------
  320. -- Wet Reed Roof Corner 2
  321. -----------------------------------------------------------------------------------------------
  322. --cooking
  323. minetest.register_craft({ -- wetreed_roof_corner -> reed_roof_corner
  324. type = "cooking",
  325. output = "dryplants:reed_roof_corner_2",
  326. recipe = "dryplants:wetreed_roof_corner_2",
  327. cooktime = 1,
  328. })
  329. --fuel
  330. minetest.register_craft({
  331. type = "fuel",
  332. recipe = "dryplants:reed_roof_corner_2",
  333. burntime = 2,
  334. })
  335. -----------------------------------------------------------------------------------------------
  336. -- Dandelion Leave
  337. -----------------------------------------------------------------------------------------------
  338. --[[minetest.register_craftitem("dryplants:dandelion_leave", {
  339. description = "Dandelion Leave",
  340. inventory_image = "dryplants_dandelion_leave.png",
  341. on_use = minetest.item_eat(1),
  342. })
  343. minetest.register_craft({
  344. type = "shapeless",
  345. output = "dryplants:dandelion_leave 4",
  346. recipe = {"flowers:dandelion_yellow"},
  347. replacements = {
  348. {"flowers:dandelion_yellow", "dye:yellow"}
  349. },
  350. })]]