locomotive_recipes.lua 3.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. if dlxtrains.crafting_enabled() then
  2. if dlxtrains.get_config_wagon_crafting_recipe_complexity() == 0 then
  3. if dlxtrains_diesel_locomotives.max_wagon_length >= 7.35 then
  4. minetest.register_craft({
  5. output = "dlxtrains_diesel_locomotives:locomotive_type1",
  6. recipe = {
  7. {dlxtrains.materials.steelblock, dlxtrains.materials.advtrains_driver_cab, dlxtrains.materials.steelblock},
  8. {dlxtrains.materials.dye_red, dlxtrains.materials.steelblock, dlxtrains.materials.mese_crystal},
  9. {dlxtrains.materials.advtrains_wheel, "dlxtrains:blueprint", dlxtrains.materials.advtrains_wheel},
  10. }
  11. })
  12. end
  13. if dlxtrains_diesel_locomotives.max_wagon_length >= 6.80725 then
  14. minetest.register_craft({
  15. output = "dlxtrains_diesel_locomotives:locomotive_type2",
  16. recipe = {
  17. {dlxtrains.materials.steelblock, dlxtrains.materials.steelblock, dlxtrains.materials.advtrains_driver_cab},
  18. {dlxtrains.materials.dye_black, dlxtrains.materials.steelblock, dlxtrains.materials.mese_crystal},
  19. {dlxtrains.materials.advtrains_wheel, "dlxtrains:blueprint", dlxtrains.materials.advtrains_wheel},
  20. }
  21. })
  22. end
  23. if dlxtrains_diesel_locomotives.max_wagon_length >= 8.2 then
  24. minetest.register_craft({
  25. output = "dlxtrains_diesel_locomotives:locomotive_type3",
  26. recipe = {
  27. {dlxtrains.materials.advtrains_driver_cab, dlxtrains.materials.steelblock, dlxtrains.materials.advtrains_driver_cab},
  28. {dlxtrains.materials.dye_red, dlxtrains.materials.steelblock, dlxtrains.materials.mese_crystal},
  29. {dlxtrains.materials.advtrains_wheel, "dlxtrains:blueprint", dlxtrains.materials.advtrains_wheel},
  30. }
  31. })
  32. end
  33. elseif dlxtrains.get_config_wagon_crafting_recipe_complexity() == 1 then
  34. if dlxtrains_diesel_locomotives.max_wagon_length >= 7.35 then
  35. minetest.register_craft({
  36. output = "dlxtrains_diesel_locomotives:locomotive_type1",
  37. recipe = {
  38. {"", "dlxtrains_diesel_locomotives:locomotive_body_type1", ""},
  39. {"dlxtrains:coupler_buffer_and_chain", "dlxtrains_diesel_locomotives:locomotive_chassis", "dlxtrains:coupler_buffer_and_chain"},
  40. {"dlxtrains_diesel_locomotives:locomotive_bogie", "dlxtrains_diesel_locomotives:fuel_tank", "dlxtrains_diesel_locomotives:locomotive_bogie"},
  41. }
  42. })
  43. end
  44. if dlxtrains_diesel_locomotives.max_wagon_length >= 6.80725 then
  45. minetest.register_craft({
  46. output = "dlxtrains_diesel_locomotives:locomotive_type2",
  47. recipe = {
  48. {"", "dlxtrains_diesel_locomotives:locomotive_body_type2", ""},
  49. {"dlxtrains:coupler_knuckle", "dlxtrains_diesel_locomotives:locomotive_chassis", "dlxtrains:coupler_knuckle"},
  50. {"dlxtrains_diesel_locomotives:locomotive_bogie", "dlxtrains_diesel_locomotives:fuel_tank", "dlxtrains_diesel_locomotives:locomotive_bogie"},
  51. }
  52. })
  53. end
  54. if dlxtrains_diesel_locomotives.max_wagon_length >= 8.2 then
  55. minetest.register_craft({
  56. output = "dlxtrains_diesel_locomotives:locomotive_type3",
  57. recipe = {
  58. {"", "dlxtrains_diesel_locomotives:locomotive_body_type3", ""},
  59. {"dlxtrains:coupler_buffer_and_chain", "dlxtrains_diesel_locomotives:locomotive_chassis", "dlxtrains:coupler_buffer_and_chain"},
  60. {"dlxtrains_diesel_locomotives:locomotive_bogie", "dlxtrains_diesel_locomotives:fuel_tank", "dlxtrains_diesel_locomotives:locomotive_bogie"},
  61. }
  62. })
  63. end
  64. end
  65. end