init.lua 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  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_BBOE_1080", {
  8. mesh="advtrains_engine_BBOE_1080.b3d",
  9. textures = {"advtrains_engine_BBOE_1080.png"},
  10. drives_on={default=true},
  11. max_speed=20,
  12. seats = {
  13. {
  14. name=S("Driver stand"),
  15. attach_offset={x=0, y=8, z=13},
  16. view_offset={x=0, y=0, z=0},
  17. group="dstand",
  18. },
  19. {
  20. name="1",
  21. attach_offset={x=-4, y=8, z=0},
  22. view_offset={x=0, y=0, z=0},
  23. group="pass",
  24. },
  25. {
  26. name="2",
  27. attach_offset={x=4, y=8, z=0},
  28. view_offset={x=0, y=0, z=0},
  29. group="pass",
  30. },
  31. {
  32. name="3",
  33. attach_offset={x=-4, y=8, z=-8},
  34. view_offset={x=0, y=0, z=0},
  35. group="pass",
  36. },
  37. {
  38. name="4",
  39. attach_offset={x=4, y=8, z=-8},
  40. view_offset={x=0, y=0, z=0},
  41. group="pass",
  42. },
  43. },
  44. seat_groups = {
  45. dstand={
  46. name = "Driver Stand",
  47. access_to = {"pass"},
  48. require_doors_open=true,
  49. driving_ctrl_access = true
  50. },
  51. pass={
  52. name = "Crew Seats",
  53. access_to = {"dstand"},
  54. require_doors_open=true,
  55. },
  56. },
  57. assign_to_seat_group = {"dstand"},
  58. doors={
  59. open={
  60. [-1]={frames={x=0, y= 20}, time=1},
  61. [1]={frames={x=40, y=60}, time=1}
  62. },
  63. close={
  64. [-1]={frames={x=20, y=40}, time=1},
  65. [1]={frames={x=60, y=80}, time=1}
  66. }
  67. },
  68. door_entry={-1},
  69. visual_size = {x=1, y=1},
  70. wagon_span=3.0,
  71. is_locomotive=true,
  72. collisionbox = {-1.0,-0.5,-1.0, 1.0,2.5,1.0},
  73. drops={"advtrains:engine_BBOE_1080"},
  74. }, S("BBÖ 1080 "), "advtrains_engine_BBOE_1080_inv.png")
  75. advtrains.register_wagon("wagon_ware", {
  76. mesh="advtrains_wagon_BBOE_ware.b3d",
  77. textures = {"advtrains_wagon_BBOE_ware.png"},
  78. drives_on={default=true},
  79. max_speed=10,
  80. seats = {},
  81. visual_size = {x=1, y=1},
  82. wagon_span=2.8,
  83. collisionbox = {-1.0,-0.5,-1.0, 1.0,2.5,1.0},
  84. drops={"advtrains:wagon_ware"},
  85. has_inventory = true,
  86. get_inventory_formspec = advtrains.standard_inventory_formspec,
  87. inventory_list_sizes = {
  88. box=8*2,
  89. },
  90. }, S("Ware Wagon (BBÖ)"), "advtrains_wagon_BBOE_ware_inv.png")