items.lua 8.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213
  1. local S = dlxtrains_diesel_locomotives.S
  2. if dlxtrains.crafting_enabled() and dlxtrains.get_config_wagon_crafting_recipe_complexity() == 1 then
  3. if dlxtrains_diesel_locomotives.max_wagon_length >= 6.80725 then
  4. minetest.register_craftitem("dlxtrains_diesel_locomotives:locomotive_chassis", {
  5. description = S("Diesel Locomotive Chassis"),
  6. inventory_image = "dlxtrains_diesel_locomotives_locomotive_chassis.png",
  7. })
  8. minetest.register_craft({
  9. output = "dlxtrains_diesel_locomotives:locomotive_chassis",
  10. recipe = {
  11. {dlxtrains.materials.steel_ingot, dlxtrains.materials.steel_ingot, dlxtrains.materials.steel_ingot},
  12. {dlxtrains.materials.steelblock, dlxtrains.materials.steelblock, dlxtrains.materials.steelblock},
  13. {dlxtrains.materials.ladder_steel, "dlxtrains:blueprint", dlxtrains.materials.ladder_steel},
  14. }
  15. })
  16. minetest.register_craftitem("dlxtrains_diesel_locomotives:locomotive_bogie", {
  17. description = S("Diesel Locomotive Bogie"),
  18. inventory_image = "dlxtrains_diesel_locomotives_bogie.png",
  19. })
  20. minetest.register_craft({
  21. output = "dlxtrains_diesel_locomotives:locomotive_bogie",
  22. recipe = {
  23. {dlxtrains.materials.steel_ingot, "", dlxtrains.materials.steel_ingot},
  24. {dlxtrains.materials.sand, dlxtrains.materials.steelblock, dlxtrains.materials.sand},
  25. {dlxtrains.materials.steel_ingot, "dlxtrains:bogie", dlxtrains.materials.steel_ingot},
  26. }
  27. })
  28. minetest.register_craftitem("dlxtrains_diesel_locomotives:fuel_tank", {
  29. description = S("Diesel Locomotive Fuel Tank"),
  30. inventory_image = "dlxtrains_diesel_locomotives_fuel_tank.png",
  31. })
  32. minetest.register_craft({
  33. output = "dlxtrains_diesel_locomotives:fuel_tank",
  34. recipe = {
  35. {dlxtrains.materials.steel_ingot, dlxtrains.materials.steel_ingot, dlxtrains.materials.steel_ingot},
  36. {dlxtrains.materials.steel_ingot, "dlxtrains:blueprint", dlxtrains.materials.steel_ingot},
  37. {"", dlxtrains.materials.steel_ingot, ""},
  38. }
  39. })
  40. minetest.register_craftitem("dlxtrains_diesel_locomotives:hood", {
  41. description = S("Diesel Locomotive Hood"),
  42. inventory_image = "dlxtrains_diesel_locomotives_hood.png",
  43. })
  44. minetest.register_craft({
  45. output = "dlxtrains_diesel_locomotives:hood",
  46. recipe = {
  47. {dlxtrains.materials.steel_ingot, dlxtrains.materials.steel_ingot, dlxtrains.materials.steel_ingot},
  48. {dlxtrains.materials.steel_ingot, "", dlxtrains.materials.steel_ingot},
  49. {dlxtrains.materials.steel_ingot, "dlxtrains:blueprint", dlxtrains.materials.steel_ingot},
  50. }
  51. })
  52. minetest.register_craftitem("dlxtrains_diesel_locomotives:cooling_fan", {
  53. description = S("Diesel Locomotive Cooling Fan"),
  54. inventory_image = "dlxtrains_diesel_locomotives_cooling_fan.png",
  55. })
  56. minetest.register_craft({
  57. output = "dlxtrains_diesel_locomotives:cooling_fan",
  58. recipe = {
  59. {dlxtrains.materials.steel_ingot, dlxtrains.materials.steel_ingot, dlxtrains.materials.steel_ingot},
  60. {dlxtrains.materials.steel_ingot, dlxtrains.materials.copper_ingot, dlxtrains.materials.steel_ingot},
  61. {dlxtrains.materials.steel_ingot, "dlxtrains:blueprint", dlxtrains.materials.steel_ingot},
  62. }
  63. })
  64. minetest.register_craftitem("dlxtrains_diesel_locomotives:radiator", {
  65. description = S("Diesel Locomotive Radiator"),
  66. inventory_image = "dlxtrains_diesel_locomotives_radiator.png",
  67. })
  68. minetest.register_craft({
  69. output = "dlxtrains_diesel_locomotives:radiator",
  70. recipe = {
  71. {dlxtrains.materials.steel_ingot, dlxtrains.materials.copper_ingot, dlxtrains.materials.steel_ingot},
  72. {dlxtrains.materials.copper_ingot, dlxtrains.materials.bucket_water, dlxtrains.materials.copper_ingot},
  73. {dlxtrains.materials.steel_ingot, "dlxtrains:blueprint", dlxtrains.materials.steel_ingot},
  74. }
  75. })
  76. minetest.register_craftitem("dlxtrains_diesel_locomotives:cooling_unit", {
  77. description = S("Diesel Locomotive Cooling Unit"),
  78. inventory_image = "dlxtrains_diesel_locomotives_cooling_unit.png",
  79. })
  80. minetest.register_craft({
  81. output = "dlxtrains_diesel_locomotives:cooling_unit",
  82. recipe = {
  83. {dlxtrains.materials.steel_ingot, "dlxtrains_diesel_locomotives:cooling_fan", dlxtrains.materials.steel_ingot},
  84. {"dlxtrains_diesel_locomotives:radiator", dlxtrains.materials.copper_ingot, "dlxtrains_diesel_locomotives:radiator"},
  85. {dlxtrains.materials.steel_ingot, dlxtrains.materials.steel_ingot, dlxtrains.materials.steel_ingot},
  86. }
  87. })
  88. minetest.register_craftitem("dlxtrains_diesel_locomotives:battery_pack", {
  89. description = S("Diesel Locomotive Battery Pack"),
  90. inventory_image = "dlxtrains_diesel_locomotives_battery_pack.png",
  91. })
  92. minetest.register_craft({
  93. output = "dlxtrains_diesel_locomotives:battery_pack",
  94. recipe = {
  95. {dlxtrains.materials.copper_ingot, dlxtrains.materials.copper_ingot, dlxtrains.materials.copper_ingot},
  96. {dlxtrains.materials.steel_ingot, dlxtrains.materials.steel_ingot, dlxtrains.materials.steel_ingot},
  97. {dlxtrains.materials.mese_crystal, "dlxtrains:blueprint", dlxtrains.materials.obsidian},
  98. }
  99. })
  100. minetest.register_craftitem("dlxtrains_diesel_locomotives:diesel_engine", {
  101. description = S("Diesel Locomotive Engine"),
  102. inventory_image = "dlxtrains_diesel_locomotives_diesel_engine.png",
  103. })
  104. minetest.register_craft({
  105. output = "dlxtrains_diesel_locomotives:diesel_engine",
  106. recipe = {
  107. {dlxtrains.materials.copper_ingot, dlxtrains.materials.steel_ingot, dlxtrains.materials.copper_ingot},
  108. {dlxtrains.materials.steel_ingot, dlxtrains.materials.steelblock, dlxtrains.materials.steel_ingot},
  109. {dlxtrains.materials.steel_ingot, "dlxtrains:blueprint", dlxtrains.materials.steel_ingot},
  110. }
  111. })
  112. minetest.register_craftitem("dlxtrains_diesel_locomotives:generator", {
  113. description = S("Diesel Locomotive Generator"),
  114. inventory_image = "dlxtrains_diesel_locomotives_generator.png",
  115. })
  116. minetest.register_craft({
  117. output = "dlxtrains_diesel_locomotives:generator",
  118. recipe = {
  119. {dlxtrains.materials.copper_ingot, dlxtrains.materials.steel_ingot, dlxtrains.materials.copper_ingot},
  120. {dlxtrains.materials.steel_ingot, dlxtrains.materials.copperblock, dlxtrains.materials.steel_ingot},
  121. {dlxtrains.materials.steel_ingot, "dlxtrains:blueprint", dlxtrains.materials.steel_ingot},
  122. }
  123. })
  124. minetest.register_craftitem("dlxtrains_diesel_locomotives:locomotive_body_type2", {
  125. description = S("North American SW1500 Diesel Locomotive Body"),
  126. inventory_image = "dlxtrains_diesel_locomotives_locomotive_body_type2.png",
  127. })
  128. minetest.register_craft({
  129. output = "dlxtrains_diesel_locomotives:locomotive_body_type2",
  130. recipe = {
  131. {"", "dlxtrains_diesel_locomotives:hood", dlxtrains.materials.advtrains_driver_cab},
  132. {"", dlxtrains.materials.dye_black, "dlxtrains_diesel_locomotives:cooling_unit"},
  133. {"dlxtrains_diesel_locomotives:battery_pack", "dlxtrains_diesel_locomotives:generator", "dlxtrains_diesel_locomotives:diesel_engine"},
  134. }
  135. })
  136. end
  137. if dlxtrains_diesel_locomotives.max_wagon_length >= 7.35 then
  138. minetest.register_craftitem("dlxtrains_diesel_locomotives:hydraulic_transmission", {
  139. description = S("Diesel Locomotive Hydraulic Transmission"),
  140. inventory_image = "dlxtrains_diesel_locomotives_hydraulic_transmission.png",
  141. })
  142. minetest.register_craft({
  143. output = "dlxtrains_diesel_locomotives:hydraulic_transmission",
  144. recipe = {
  145. {"", dlxtrains.materials.steelblock, ""},
  146. {dlxtrains.materials.steel_ingot, dlxtrains.materials.bucket_water, dlxtrains.materials.steel_ingot},
  147. {"", "dlxtrains:blueprint", ""},
  148. }
  149. })
  150. minetest.register_craftitem("dlxtrains_diesel_locomotives:locomotive_body_type1", {
  151. description = S("European G1206 Diesel Locomotive Body"),
  152. inventory_image = "dlxtrains_diesel_locomotives_locomotive_body_type1.png",
  153. })
  154. minetest.register_craft({
  155. output = "dlxtrains_diesel_locomotives:locomotive_body_type1",
  156. recipe = {
  157. {"dlxtrains_diesel_locomotives:hood", dlxtrains.materials.advtrains_driver_cab, "dlxtrains_diesel_locomotives:hood"},
  158. {dlxtrains.materials.dye_red, "dlxtrains_diesel_locomotives:cooling_unit", "dlxtrains_diesel_locomotives:cooling_unit"},
  159. {"dlxtrains_diesel_locomotives:battery_pack", "dlxtrains_diesel_locomotives:hydraulic_transmission", "dlxtrains_diesel_locomotives:diesel_engine"},
  160. }
  161. })
  162. end
  163. if dlxtrains_diesel_locomotives.max_wagon_length >= 8.2 then
  164. minetest.register_craftitem("dlxtrains_diesel_locomotives:locomotive_body_type3", {
  165. description = S("European BR218 Diesel Locomotive Body"),
  166. inventory_image = "dlxtrains_diesel_locomotives_locomotive_body_type3.png",
  167. })
  168. minetest.register_craft({
  169. output = "dlxtrains_diesel_locomotives:locomotive_body_type3",
  170. recipe = {
  171. {dlxtrains.materials.advtrains_driver_cab, "dlxtrains_diesel_locomotives:hood", dlxtrains.materials.advtrains_driver_cab},
  172. {dlxtrains.materials.dye_red, "dlxtrains_diesel_locomotives:cooling_unit", "dlxtrains_diesel_locomotives:generator"},
  173. {"dlxtrains_diesel_locomotives:battery_pack", "dlxtrains_diesel_locomotives:hydraulic_transmission", "dlxtrains_diesel_locomotives:diesel_engine"},
  174. }
  175. })
  176. end
  177. end