rails.lua 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. carts:register_rail("carts:rail", {
  2. description = "Iron Rail",
  3. tiles = {
  4. "carts_rail_straight.png", "carts_rail_curved.png",
  5. "carts_rail_t_junction.png", "carts_rail_crossing.png"
  6. },
  7. inventory_image = "carts_rail_straight.png",
  8. wield_image = "carts_rail_straight.png",
  9. groups = carts:get_rail_groups(),
  10. }, {})
  11. minetest.register_craft({
  12. output = "carts:rail 16",
  13. recipe = {
  14. {"default:steel_ingot", "", "default:steel_ingot"},
  15. {"default:steel_ingot", "group:stick", "default:steel_ingot"},
  16. {"default:steel_ingot", "", "default:steel_ingot"},
  17. }
  18. })
  19. minetest.register_alias("default:rail", "carts:rail")
  20. carts:register_rail("carts:powerrail", {
  21. description = "Powered Rail",
  22. tiles = {
  23. "carts_rail_straight_pwr.png", "carts_rail_curved_pwr.png",
  24. "carts_rail_t_junction_pwr.png", "carts_rail_crossing_pwr.png"
  25. },
  26. groups = carts:get_rail_groups(),
  27. }, {acceleration = 5})
  28. minetest.register_craft({
  29. output = "carts:powerrail 8",
  30. recipe = {
  31. {"default:steel_ingot", "default:mese_crystal_fragment", "default:steel_ingot"},
  32. {"default:steel_ingot", "group:stick", "default:steel_ingot"},
  33. {"default:steel_ingot", "default:mese_crystal_fragment", "default:steel_ingot"},
  34. }
  35. })
  36. carts:register_rail("carts:brakerail", {
  37. description = "Brake Rail",
  38. tiles = {
  39. "carts_rail_straight_brk.png", "carts_rail_curved_brk.png",
  40. "carts_rail_t_junction_brk.png", "carts_rail_crossing_brk.png"
  41. },
  42. groups = carts:get_rail_groups(),
  43. }, {acceleration = -3})
  44. minetest.register_craft({
  45. output = "carts:brakerail 8",
  46. recipe = {
  47. {"default:steel_ingot", "rubber:rubber_fiber", "default:steel_ingot"},
  48. {"default:steel_ingot", "group:stick", "default:steel_ingot"},
  49. {"default:steel_ingot", "rubber:rubber_fiber", "default:steel_ingot"},
  50. }
  51. })