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. driving_ctrl_access=true,
  18. group="dstand",
  19. },
  20. {
  21. name="1",
  22. attach_offset={x=-4, y=8, z=0},
  23. view_offset={x=0, y=0, z=0},
  24. group="pass",
  25. },
  26. {
  27. name="2",
  28. attach_offset={x=4, y=8, z=0},
  29. view_offset={x=0, y=0, z=0},
  30. group="pass",
  31. },
  32. {
  33. name="3",
  34. attach_offset={x=-4, y=8, z=-8},
  35. view_offset={x=0, y=0, z=0},
  36. group="pass",
  37. },
  38. {
  39. name="4",
  40. attach_offset={x=4, y=8, z=-8},
  41. view_offset={x=0, y=0, z=0},
  42. group="pass",
  43. },
  44. },
  45. seat_groups = {
  46. dstand={
  47. name = "Driver Stand",
  48. access_to = {"pass"},
  49. require_doors_open=true,
  50. },
  51. pass={
  52. name = "Engenier's area",
  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")