init.lua 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. local S
  2. if minetest.get_modpath("intllib") then
  3. S = intllib.Getter()
  4. else
  5. S = function(s,a,...)a={a,...}return s:gsub("@(%d+)",function(n)return a[tonumber(n)]end)end
  6. end
  7. advtrains.register_wagon("engine_zugspitzbahn", {
  8. mesh="advtrains_engine_bzb.b3d",
  9. textures = {"advtrains_engine_bzb.png"},
  10. drives_on={default=true},
  11. max_speed=15,
  12. seats = {
  13. {
  14. name=S("Driver Stand (front)"),
  15. attach_offset={x=0, y=6, z=8},
  16. view_offset={x=0, y=-3, z=0},
  17. group = "dstand",
  18. },
  19. {
  20. name=S("Driver Stand (back)"),
  21. attach_offset={x=0, y=-6, z=8},
  22. view_offset={x=0, y=-3, z=0},
  23. group = "dstand",
  24. },
  25. },
  26. seat_groups = {
  27. dstand={
  28. name = "Driver Stand",
  29. access_to = {},
  30. driving_ctrl_access=true,
  31. },
  32. },
  33. assign_to_seat_group = {"dstand"},
  34. wagon_span=2.7,
  35. visual_size = {x=1, y=1},
  36. collisionbox = {-1.0,-0.5,-1.0, 1.0,2.5,1.0},
  37. is_locomotive=true,
  38. drops={"advtrains:engine_zugspitzbahn"},
  39. }, S("Zugspitzbahn engine"), "advtrains_bzb_inv.png")
  40. advtrains.register_wagon("wagon_zugspitzbahn", {
  41. mesh="advtrains_wagon_bzb.b3d",
  42. textures = {"advtrains_bzb.png"},
  43. drives_on={default=true},
  44. max_speed=10,
  45. seats = {
  46. {
  47. name="1",
  48. attach_offset={x=2, y=6, z=8},
  49. view_offset={x=0, y=-4, z=0},
  50. group="pass",
  51. },
  52. {
  53. name="2",
  54. attach_offset={x=-1, y=6, z=8},
  55. view_offset={x=0, y=-4, z=0},
  56. group="pass",
  57. },
  58. {
  59. name="3",
  60. attach_offset={x=-4, y=8, z=-8},
  61. view_offset={x=0, y=0, z=0},
  62. group="pass",
  63. },
  64. {
  65. name="4",
  66. attach_offset={x=4, y=8, z=-8},
  67. view_offset={x=0, y=0, z=0},
  68. group="pass",
  69. },
  70. },
  71. seat_groups = {
  72. pass={
  73. name = "Passenger area",
  74. access_to = {},
  75. },
  76. },
  77. assign_to_seat_group = {"pass"},
  78. visual_size = {x=1, y=1},
  79. wagon_span=3,
  80. collisionbox = {-1.0,-0.5,-1.0, 1.0,2.5,1.0},
  81. drops={"default:steelblock 4"},
  82. }, S("Passenger Zugspitzbahn wagon"), "advtrains_bzb_inv.png")