items.lua 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197
  1. local S = dlxtrains_industrial_wagons.S
  2. if dlxtrains.crafting_enabled() and dlxtrains.get_config_wagon_crafting_recipe_complexity() == 1 then
  3. if dlxtrains_industrial_wagons.max_wagon_length >= 8.5 then
  4. minetest.register_craftitem("dlxtrains_industrial_wagons:container_body_type1", {
  5. description = S("Container Wagon Cargo Mounts"),
  6. inventory_image = "dlxtrains_industrial_wagons_container_body_type1.png",
  7. })
  8. minetest.register_craft({
  9. output = "dlxtrains_industrial_wagons:container_body_type1",
  10. recipe = {
  11. {dlxtrains.materials.dye_black, "dlxtrains:blueprint", dlxtrains.materials.dye_yellow},
  12. {dlxtrains.materials.steel_ingot, dlxtrains.materials.chest, dlxtrains.materials.steel_ingot},
  13. {dlxtrains.materials.steel_ingot, dlxtrains.materials.steel_ingot, dlxtrains.materials.steel_ingot},
  14. }
  15. })
  16. end
  17. if dlxtrains_support_wagons.max_wagon_length >= 4.875 then
  18. minetest.register_craftitem("dlxtrains_industrial_wagons:brakemans_cabin", {
  19. description = S("Brakeman's Cabin"),
  20. inventory_image = "dlxtrains_industrial_wagons_brakemans_cabin.png",
  21. })
  22. minetest.register_craft({
  23. output = "dlxtrains_industrial_wagons:brakemans_cabin",
  24. recipe = {
  25. {"dlxtrains:blueprint", dlxtrains.materials.glass},
  26. {dlxtrains.materials.steel_ingot, dlxtrains.materials.wood},
  27. {dlxtrains.materials.steel_ingot, dlxtrains.materials.wood},
  28. }
  29. })
  30. end
  31. if dlxtrains_industrial_wagons.max_wagon_length >= 4.875 then
  32. minetest.register_craftitem("dlxtrains_industrial_wagons:container_body_type2", {
  33. description = S("Container Wagon Single Cargo Mount"),
  34. inventory_image = "dlxtrains_industrial_wagons_container_body_type2.png",
  35. })
  36. minetest.register_craft({
  37. output = "dlxtrains_industrial_wagons:container_body_type2",
  38. recipe = {
  39. {dlxtrains.materials.dye_black, "dlxtrains:blueprint", dlxtrains.materials.dye_yellow},
  40. {"", dlxtrains.materials.chest, ""},
  41. {dlxtrains.materials.steel_ingot, dlxtrains.materials.steel_ingot, dlxtrains.materials.steel_ingot},
  42. }
  43. })
  44. end
  45. if dlxtrains_industrial_wagons.max_wagon_length >= 8 then
  46. minetest.register_craftitem("dlxtrains_industrial_wagons:covered_goods_body_type1", {
  47. description = S("North American Wooden Boxcar Cargo Housing"),
  48. inventory_image = "dlxtrains_industrial_wagons_covered_goods_body_type1.png",
  49. })
  50. minetest.register_craft({
  51. output = "dlxtrains_industrial_wagons:covered_goods_body_type1",
  52. recipe = {
  53. {dlxtrains.materials.steel_ingot, dlxtrains.materials.wood, dlxtrains.materials.steel_ingot},
  54. {dlxtrains.materials.wood, dlxtrains.materials.chest, dlxtrains.materials.wood},
  55. {dlxtrains.materials.wood, "dlxtrains:blueprint", dlxtrains.materials.wood},
  56. }
  57. })
  58. end
  59. if dlxtrains_industrial_wagons.max_wagon_length >= 8 then
  60. minetest.register_craftitem("dlxtrains_industrial_wagons:covered_goods_body_type2", {
  61. description = S("Australian Louver Van Cargo Housing"),
  62. inventory_image = "dlxtrains_industrial_wagons_covered_goods_body_type2.png",
  63. })
  64. minetest.register_craft({
  65. output = "dlxtrains_industrial_wagons:covered_goods_body_type2",
  66. recipe = {
  67. {dlxtrains.materials.steel_ingot, dlxtrains.materials.steel_ingot, dlxtrains.materials.steel_ingot},
  68. {"", dlxtrains.materials.chest, ""},
  69. {dlxtrains.materials.steel_ingot, "dlxtrains:blueprint", dlxtrains.materials.steel_ingot},
  70. }
  71. })
  72. end
  73. if dlxtrains_industrial_wagons.max_wagon_length >= 7 then
  74. minetest.register_craftitem("dlxtrains_industrial_wagons:covered_goods_body_type3", {
  75. description = S("European Wooden Covered Goods Wagon Cargo Housing"),
  76. inventory_image = "dlxtrains_industrial_wagons_covered_goods_body_type3.png",
  77. })
  78. minetest.register_craft({
  79. output = "dlxtrains_industrial_wagons:covered_goods_body_type3",
  80. recipe = {
  81. {dlxtrains.materials.steel_ingot, dlxtrains.materials.steel_ingot, dlxtrains.materials.steel_ingot},
  82. {dlxtrains.materials.tin_ingot, dlxtrains.materials.chest, dlxtrains.materials.tin_ingot},
  83. {dlxtrains.materials.wood, "dlxtrains:blueprint", dlxtrains.materials.wood},
  84. }
  85. })
  86. end
  87. if dlxtrains_industrial_wagons.max_wagon_length >= 6 then
  88. minetest.register_craftitem("dlxtrains_industrial_wagons:flat_body_type1", {
  89. description = S("Flat Wagon Cargo Deck"),
  90. inventory_image = "dlxtrains_industrial_wagons_flat_body_type1.png",
  91. })
  92. minetest.register_craft({
  93. output = "dlxtrains_industrial_wagons:flat_body_type1",
  94. recipe = {
  95. {"", "dlxtrains:blueprint", ""},
  96. {"", dlxtrains.materials.chest, ""},
  97. {dlxtrains.materials.wood, dlxtrains.materials.wood, dlxtrains.materials.wood},
  98. }
  99. })
  100. end
  101. if dlxtrains_industrial_wagons.max_wagon_length >= 6 then
  102. minetest.register_craftitem("dlxtrains_industrial_wagons:hopper_body_type1", {
  103. description = S("Hopper Wagon Cargo Bin"),
  104. inventory_image = "dlxtrains_industrial_wagons_hopper_body_type1.png",
  105. })
  106. minetest.register_craft({
  107. output = "dlxtrains_industrial_wagons:hopper_body_type1",
  108. recipe = {
  109. {"", "dlxtrains:blueprint", ""},
  110. {dlxtrains.materials.steel_ingot, dlxtrains.materials.chest, dlxtrains.materials.steel_ingot},
  111. {dlxtrains.materials.steel_ingot, dlxtrains.materials.steel_ingot, dlxtrains.materials.steel_ingot},
  112. }
  113. })
  114. end
  115. if dlxtrains_industrial_wagons.max_wagon_length >= 6 then
  116. minetest.register_craftitem("dlxtrains_industrial_wagons:livestock_body_type1", {
  117. description = S("Australian Cattle Van Cargo Housing"),
  118. inventory_image = "dlxtrains_industrial_wagons_livestock_body_type1.png",
  119. })
  120. minetest.register_craft({
  121. output = "dlxtrains_industrial_wagons:livestock_body_type1",
  122. recipe = {
  123. {dlxtrains.materials.steel_ingot, dlxtrains.materials.steel_ingot, dlxtrains.materials.steel_ingot},
  124. {dlxtrains.materials.wood, dlxtrains.materials.chest, dlxtrains.materials.wood},
  125. {dlxtrains.materials.wood, "dlxtrains:blueprint", dlxtrains.materials.wood},
  126. }
  127. })
  128. end
  129. if dlxtrains_industrial_wagons.max_wagon_length >= 6 then
  130. minetest.register_craftitem("dlxtrains_industrial_wagons:open_body_type1", {
  131. description = S("Open Wagon Cargo Deck"),
  132. inventory_image = "dlxtrains_industrial_wagons_open_body_type1.png",
  133. })
  134. minetest.register_craft({
  135. output = "dlxtrains_industrial_wagons:open_body_type1",
  136. recipe = {
  137. {"", "dlxtrains:blueprint", ""},
  138. {dlxtrains.materials.steel_ingot, dlxtrains.materials.chest, dlxtrains.materials.steel_ingot},
  139. {dlxtrains.materials.steel_ingot, dlxtrains.materials.wood, dlxtrains.materials.steel_ingot},
  140. }
  141. })
  142. end
  143. if dlxtrains_support_wagons.max_wagon_length >= 4.875 then
  144. minetest.register_craftitem("dlxtrains_industrial_wagons:small_tank", {
  145. description = S("Small Tank"),
  146. inventory_image = "dlxtrains_industrial_wagons_small_tank.png",
  147. })
  148. minetest.register_craft({
  149. output = "dlxtrains_industrial_wagons:small_tank",
  150. recipe = {
  151. {"", "dlxtrains:blueprint", ""},
  152. {dlxtrains.materials.steel_ingot, dlxtrains.materials.bucket_empty, dlxtrains.materials.steel_ingot},
  153. {dlxtrains.materials.steel_ingot, dlxtrains.materials.chest, dlxtrains.materials.steel_ingot},
  154. }
  155. })
  156. end
  157. if dlxtrains_industrial_wagons.max_wagon_length >= 6 then
  158. minetest.register_craftitem("dlxtrains_industrial_wagons:stake_body_type1", {
  159. description = S("Stake Wagon Cargo Deck"),
  160. inventory_image = "dlxtrains_industrial_wagons_stake_body_type1.png",
  161. })
  162. minetest.register_craft({
  163. output = "dlxtrains_industrial_wagons:stake_body_type1",
  164. recipe = {
  165. {dlxtrains.materials.steel_ingot, "dlxtrains:blueprint", dlxtrains.materials.steel_ingot},
  166. {dlxtrains.materials.steel_ingot, dlxtrains.materials.chest, dlxtrains.materials.steel_ingot},
  167. {dlxtrains.materials.wood, dlxtrains.materials.wood, dlxtrains.materials.wood},
  168. }
  169. })
  170. end
  171. end