wagon_recipes.lua 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333
  1. if dlxtrains.crafting_enabled() then
  2. if dlxtrains.get_config_wagon_crafting_recipe_complexity() == 0 then
  3. if dlxtrains_industrial_wagons.max_wagon_length >= 8.5 then
  4. minetest.register_craft({
  5. output = "dlxtrains_industrial_wagons:container_type1",
  6. recipe = {
  7. {"", dlxtrains.materials.steel_ingot, ""},
  8. {dlxtrains.materials.chest, dlxtrains.materials.steel_ingot, dlxtrains.materials.chest},
  9. {dlxtrains.materials.advtrains_wheel, "dlxtrains:blueprint", dlxtrains.materials.advtrains_wheel},
  10. }
  11. })
  12. end
  13. if dlxtrains_industrial_wagons.max_wagon_length >= 4.875 then
  14. minetest.register_craft({
  15. output = "dlxtrains_industrial_wagons:container_type2",
  16. recipe = {
  17. {"", dlxtrains.materials.tin_ingot, ""},
  18. {dlxtrains.materials.steel_ingot, dlxtrains.materials.chest, dlxtrains.materials.steel_ingot},
  19. {dlxtrains.materials.advtrains_wheel, "dlxtrains:blueprint", dlxtrains.materials.advtrains_wheel},
  20. }
  21. })
  22. end
  23. if dlxtrains_industrial_wagons.max_wagon_length >= 8 then
  24. minetest.register_craft({
  25. output = "dlxtrains_industrial_wagons:covered_goods_type1",
  26. recipe = {
  27. {dlxtrains.materials.wood, dlxtrains.materials.steel_ingot, dlxtrains.materials.wood},
  28. {dlxtrains.materials.wood, "", dlxtrains.materials.wood},
  29. {"dlxtrains:blueprint", "dlxtrains_industrial_wagons:flat_type1", dlxtrains.materials.steel_ingot},
  30. }
  31. })
  32. end
  33. if dlxtrains_industrial_wagons.max_wagon_length >= 8 then
  34. minetest.register_craft({
  35. output = "dlxtrains_industrial_wagons:covered_goods_type2",
  36. recipe = {
  37. {dlxtrains.materials.tin_ingot, dlxtrains.materials.steel_ingot, dlxtrains.materials.tin_ingot},
  38. {dlxtrains.materials.tin_ingot, "", dlxtrains.materials.tin_ingot},
  39. {"dlxtrains:blueprint", "dlxtrains_industrial_wagons:flat_type1", dlxtrains.materials.steel_ingot},
  40. }
  41. })
  42. end
  43. if dlxtrains_industrial_wagons.max_wagon_length >= 7 then
  44. minetest.register_craft({
  45. output = "dlxtrains_industrial_wagons:covered_goods_type3",
  46. recipe = {
  47. {dlxtrains.materials.wood, dlxtrains.materials.steel_ingot, dlxtrains.materials.wood},
  48. {dlxtrains.materials.tin_ingot, "", dlxtrains.materials.tin_ingot},
  49. {"", "dlxtrains_industrial_wagons:flat_type1", ""},
  50. }
  51. })
  52. end
  53. if dlxtrains_industrial_wagons.max_wagon_length >= 6 then
  54. minetest.register_craft({
  55. output = "dlxtrains_industrial_wagons:flat_type1",
  56. recipe = {
  57. {dlxtrains.materials.wood, dlxtrains.materials.wood, dlxtrains.materials.wood},
  58. {dlxtrains.materials.steel_ingot, dlxtrains.materials.chest, dlxtrains.materials.steel_ingot},
  59. {dlxtrains.materials.advtrains_wheel, "dlxtrains:blueprint", dlxtrains.materials.advtrains_wheel},
  60. }
  61. })
  62. end
  63. if dlxtrains_industrial_wagons.max_wagon_length >= 6 then
  64. minetest.register_craft({
  65. output = "dlxtrains_industrial_wagons:flat_type2",
  66. recipe = {
  67. {dlxtrains.materials.wood, dlxtrains.materials.wood, dlxtrains.materials.steel_ingot},
  68. {dlxtrains.materials.steel_ingot, dlxtrains.materials.chest, dlxtrains.materials.steel_ingot},
  69. {dlxtrains.materials.advtrains_wheel, "dlxtrains:blueprint", dlxtrains.materials.advtrains_wheel},
  70. }
  71. })
  72. end
  73. if dlxtrains_industrial_wagons.max_wagon_length >= 6 then
  74. minetest.register_craft({
  75. output = "dlxtrains_industrial_wagons:hopper_type1",
  76. recipe = {
  77. {dlxtrains.materials.steelblock, "", dlxtrains.materials.steelblock},
  78. {dlxtrains.materials.steel_ingot, dlxtrains.materials.chest, dlxtrains.materials.steel_ingot},
  79. {dlxtrains.materials.advtrains_wheel, "dlxtrains:blueprint", dlxtrains.materials.advtrains_wheel},
  80. }
  81. })
  82. end
  83. if dlxtrains_industrial_wagons.max_wagon_length >= 6 then
  84. minetest.register_craft({
  85. output = "dlxtrains_industrial_wagons:hopper_type2",
  86. recipe = {
  87. {dlxtrains.materials.steel_ingot, dlxtrains.materials.steel_ingot, dlxtrains.materials.steel_ingot},
  88. {"", "dlxtrains_industrial_wagons:hopper_type1", ""},
  89. }
  90. })
  91. end
  92. if dlxtrains_industrial_wagons.max_wagon_length >= 6 then
  93. minetest.register_craft({
  94. output = "dlxtrains_industrial_wagons:livestock_type1",
  95. recipe = {
  96. {dlxtrains.materials.steel_ingot, dlxtrains.materials.steel_ingot, dlxtrains.materials.steel_ingot},
  97. {dlxtrains.materials.wood, "", dlxtrains.materials.wood},
  98. {"", "dlxtrains_industrial_wagons:flat_type2", ""},
  99. }
  100. })
  101. end
  102. if dlxtrains_industrial_wagons.max_wagon_length >= 6 then
  103. minetest.register_craft({
  104. output = "dlxtrains_industrial_wagons:open_type1",
  105. recipe = {
  106. {dlxtrains.materials.steel_ingot, dlxtrains.materials.wood, dlxtrains.materials.steel_ingot},
  107. {dlxtrains.materials.steel_ingot, dlxtrains.materials.chest, dlxtrains.materials.steel_ingot},
  108. {dlxtrains.materials.advtrains_wheel, "dlxtrains:blueprint", dlxtrains.materials.advtrains_wheel},
  109. }
  110. })
  111. end
  112. if dlxtrains_industrial_wagons.max_wagon_length >= 6 then
  113. minetest.register_craft({
  114. output = "dlxtrains_industrial_wagons:stake_type1",
  115. recipe = {
  116. {dlxtrains.materials.steel_ingot, "", dlxtrains.materials.steel_ingot},
  117. {dlxtrains.materials.steel_ingot, "", dlxtrains.materials.steel_ingot},
  118. {"", "dlxtrains_industrial_wagons:flat_type1", ""},
  119. }
  120. })
  121. end
  122. if dlxtrains_industrial_wagons.max_wagon_length >= 4.875 then
  123. minetest.register_craft({
  124. output = "dlxtrains_industrial_wagons:tank_type1",
  125. recipe = {
  126. {dlxtrains.materials.wood, dlxtrains.materials.bucket_empty, dlxtrains.materials.ladder_steel},
  127. {dlxtrains.materials.steel_ingot, dlxtrains.materials.chest, dlxtrains.materials.steel_ingot},
  128. {dlxtrains.materials.advtrains_wheel, "dlxtrains:blueprint", dlxtrains.materials.advtrains_wheel},
  129. }
  130. })
  131. end
  132. if dlxtrains_industrial_wagons.max_wagon_length >= 4.875 then
  133. minetest.register_craft({
  134. output = "dlxtrains_industrial_wagons:tank_type2",
  135. recipe = {
  136. {dlxtrains.materials.steel_ingot, dlxtrains.materials.bucket_empty, dlxtrains.materials.ladder_steel},
  137. {dlxtrains.materials.steel_ingot, dlxtrains.materials.chest, dlxtrains.materials.steel_ingot},
  138. {dlxtrains.materials.advtrains_wheel, "dlxtrains:blueprint", dlxtrains.materials.advtrains_wheel},
  139. }
  140. })
  141. end
  142. if dlxtrains_industrial_wagons.max_wagon_length >= 6 then
  143. minetest.register_craft({
  144. output = "dlxtrains_industrial_wagons:transition_type1",
  145. recipe = {
  146. {"dlxtrains:blueprint", "dlxtrains_industrial_wagons:flat_type1", dlxtrains.materials.steel_ingot},
  147. }
  148. })
  149. end
  150. elseif dlxtrains.get_config_wagon_crafting_recipe_complexity() == 1 then
  151. if dlxtrains_industrial_wagons.max_wagon_length >= 8.5 then
  152. minetest.register_craft({
  153. output = "dlxtrains_industrial_wagons:container_type1",
  154. recipe = {
  155. {"", "dlxtrains_industrial_wagons:container_body_type1", ""},
  156. {"dlxtrains:coupler_buffer_and_chain", "dlxtrains:wagon_chassis", "dlxtrains:coupler_buffer_and_chain"},
  157. {"dlxtrains:wheel_set", "", "dlxtrains:wheel_set"},
  158. }
  159. })
  160. end
  161. if dlxtrains_industrial_wagons.max_wagon_length >= 4.875 then
  162. minetest.register_craft({
  163. output = "dlxtrains_industrial_wagons:container_type2",
  164. recipe = {
  165. {"", "dlxtrains_industrial_wagons:container_body_type2", ""},
  166. {"dlxtrains:coupler_buffer_and_chain", "dlxtrains:wagon_chassis", "dlxtrains:coupler_buffer_and_chain"},
  167. {"dlxtrains:wheel_set", "", "dlxtrains:wheel_set"},
  168. }
  169. })
  170. end
  171. if dlxtrains_industrial_wagons.max_wagon_length >= 8 then
  172. minetest.register_craft({
  173. output = "dlxtrains_industrial_wagons:covered_goods_type1",
  174. recipe = {
  175. {"", "dlxtrains_industrial_wagons:covered_goods_body_type1", ""},
  176. {"dlxtrains:coupler_knuckle", "dlxtrains:wagon_chassis", "dlxtrains:coupler_knuckle"},
  177. {"dlxtrains:bogie", "", "dlxtrains:bogie"},
  178. }
  179. })
  180. end
  181. if dlxtrains_industrial_wagons.max_wagon_length >= 8 then
  182. minetest.register_craft({
  183. output = "dlxtrains_industrial_wagons:covered_goods_type2",
  184. recipe = {
  185. {"", "dlxtrains_industrial_wagons:covered_goods_body_type2", ""},
  186. {"dlxtrains:coupler_knuckle", "dlxtrains:wagon_chassis", "dlxtrains:coupler_knuckle"},
  187. {"dlxtrains:bogie", "", "dlxtrains:bogie"},
  188. }
  189. })
  190. end
  191. if dlxtrains_industrial_wagons.max_wagon_length >= 7 then
  192. minetest.register_craft({
  193. output = "dlxtrains_industrial_wagons:covered_goods_type3",
  194. recipe = {
  195. {"", "dlxtrains_industrial_wagons:covered_goods_body_type3", ""},
  196. {"dlxtrains:coupler_buffer_and_chain", "dlxtrains:wagon_chassis", "dlxtrains:coupler_buffer_and_chain"},
  197. {"dlxtrains:wheel_set", "", "dlxtrains:wheel_set"},
  198. }
  199. })
  200. end
  201. if dlxtrains_industrial_wagons.max_wagon_length >= 6 then
  202. minetest.register_craft({
  203. output = "dlxtrains_industrial_wagons:flat_type1",
  204. recipe = {
  205. {"", "dlxtrains_industrial_wagons:flat_body_type1", ""},
  206. {"dlxtrains:coupler_buffer_and_chain", "dlxtrains:wagon_chassis", "dlxtrains:coupler_buffer_and_chain"},
  207. {"dlxtrains:bogie", "", "dlxtrains:bogie"},
  208. }
  209. })
  210. end
  211. if dlxtrains_industrial_wagons.max_wagon_length >= 6 then
  212. minetest.register_craft({
  213. output = "dlxtrains_industrial_wagons:flat_type2",
  214. recipe = {
  215. {"", "dlxtrains_industrial_wagons:flat_body_type1", dlxtrains.materials.steel_ingot},
  216. {"dlxtrains:coupler_knuckle", "dlxtrains:wagon_chassis", "dlxtrains:coupler_knuckle"},
  217. {"dlxtrains:bogie", "", "dlxtrains:bogie"},
  218. }
  219. })
  220. end
  221. if dlxtrains_industrial_wagons.max_wagon_length >= 6 then
  222. minetest.register_craft({
  223. output = "dlxtrains_industrial_wagons:hopper_type1",
  224. recipe = {
  225. {"", "dlxtrains_industrial_wagons:hopper_body_type1", ""},
  226. {"dlxtrains:coupler_knuckle", "dlxtrains:wagon_chassis", "dlxtrains:coupler_knuckle"},
  227. {"dlxtrains:bogie", "", "dlxtrains:bogie"},
  228. }
  229. })
  230. end
  231. if dlxtrains_industrial_wagons.max_wagon_length >= 6 then
  232. minetest.register_craft({
  233. output = "dlxtrains_industrial_wagons:hopper_type2",
  234. recipe = {
  235. {dlxtrains.materials.steel_ingot, dlxtrains.materials.steel_ingot, dlxtrains.materials.steel_ingot},
  236. {"", "dlxtrains_industrial_wagons:hopper_type1", ""},
  237. }
  238. })
  239. end
  240. if dlxtrains_industrial_wagons.max_wagon_length >= 6 then
  241. minetest.register_craft({
  242. output = "dlxtrains_industrial_wagons:livestock_type1",
  243. recipe = {
  244. {"", "dlxtrains_industrial_wagons:livestock_body_type1", ""},
  245. {"dlxtrains:coupler_knuckle", "dlxtrains:wagon_chassis", "dlxtrains:coupler_knuckle"},
  246. {"dlxtrains:bogie", "", "dlxtrains:bogie"},
  247. }
  248. })
  249. end
  250. if dlxtrains_industrial_wagons.max_wagon_length >= 6 then
  251. minetest.register_craft({
  252. output = "dlxtrains_industrial_wagons:open_type1",
  253. recipe = {
  254. {"", "dlxtrains_industrial_wagons:open_body_type1", ""},
  255. {"dlxtrains:coupler_knuckle", "dlxtrains:wagon_chassis", "dlxtrains:coupler_knuckle"},
  256. {"dlxtrains:bogie", "", "dlxtrains:bogie"},
  257. }
  258. })
  259. end
  260. if dlxtrains_industrial_wagons.max_wagon_length >= 6 then
  261. minetest.register_craft({
  262. output = "dlxtrains_industrial_wagons:stake_type1",
  263. recipe = {
  264. {"", "dlxtrains_industrial_wagons:stake_body_type1", ""},
  265. {"dlxtrains:coupler_buffer_and_chain", "dlxtrains:wagon_chassis", "dlxtrains:coupler_buffer_and_chain"},
  266. {"dlxtrains:wheel_set", "", "dlxtrains:wheel_set"},
  267. }
  268. })
  269. end
  270. if dlxtrains_industrial_wagons.max_wagon_length >= 4.875 then
  271. minetest.register_craft({
  272. output = "dlxtrains_industrial_wagons:tank_type1",
  273. recipe = {
  274. {"dlxtrains_industrial_wagons:brakemans_cabin", "dlxtrains_industrial_wagons:small_tank", dlxtrains.materials.ladder_steel},
  275. {"dlxtrains:coupler_buffer_and_chain", "dlxtrains:wagon_chassis", "dlxtrains:coupler_buffer_and_chain"},
  276. {"dlxtrains:wheel_set", "", "dlxtrains:wheel_set"},
  277. }
  278. })
  279. end
  280. if dlxtrains_industrial_wagons.max_wagon_length >= 4.875 then
  281. minetest.register_craft({
  282. output = "dlxtrains_industrial_wagons:tank_type2",
  283. recipe = {
  284. {dlxtrains.materials.steel_ingot, "dlxtrains_industrial_wagons:small_tank", dlxtrains.materials.ladder_steel},
  285. {"dlxtrains:coupler_buffer_and_chain", "dlxtrains:wagon_chassis", "dlxtrains:coupler_buffer_and_chain"},
  286. {"dlxtrains:wheel_set", "", "dlxtrains:wheel_set"},
  287. }
  288. })
  289. end
  290. if dlxtrains_industrial_wagons.max_wagon_length >= 6 then
  291. minetest.register_craft({
  292. output = "dlxtrains_industrial_wagons:transition_type1",
  293. recipe = {
  294. {"", "dlxtrains_industrial_wagons:flat_body_type1", ""},
  295. {"dlxtrains:coupler_buffer_and_chain", "dlxtrains:wagon_chassis", "dlxtrains:coupler_knuckle"},
  296. {"dlxtrains:bogie", "", "dlxtrains:bogie"},
  297. }
  298. })
  299. end
  300. end
  301. end