init.lua 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159
  1. local S = attrans
  2. advtrains.register_wagon("engine_industrial", {
  3. mesh="advtrains_engine_industrial.b3d",
  4. textures = {"advtrains_engine_industrial.png"},
  5. drives_on={default=true},
  6. max_speed=20,
  7. seats = {
  8. {
  9. name=S("Driver Stand (right)"),
  10. attach_offset={x=5, y=-3, z=-8},
  11. view_offset={x=5.2, y=-4, z=0},
  12. driving_ctrl_access=true,
  13. group = "dstand",
  14. },
  15. {
  16. name=S("Driver Stand (left)"),
  17. attach_offset={x=5, y=7, z=-8},
  18. view_offset={x=-5.2, y=-4, z=0},
  19. driving_ctrl_access=true,
  20. group = "dstand",
  21. },
  22. },
  23. seat_groups = {
  24. dstand={
  25. name = "Driver Stand",
  26. access_to = {},
  27. driving_ctrl_access = true,
  28. },
  29. },
  30. assign_to_seat_group = {"dstand"},
  31. coupler_types_front = {chain=true},
  32. coupler_types_back = {chain=true},
  33. visual_size = {x=1, y=1},
  34. wagon_span=2.6,
  35. is_locomotive=true,
  36. collisionbox = {-1.0,-0.5,-1.0, 1.0,2.5,1.0},
  37. drops={"default:steelblock 4"},
  38. horn_sound = "advtrains_industrial_horn",
  39. }, S("Industrial Train Engine"), "advtrains_engine_industrial_inv.png")
  40. --big--
  41. advtrains.register_wagon("engine_industrial_big", {
  42. mesh="advtrains_engine_industrial_big.b3d",
  43. textures = {"advtrains_engine_industrial_big.png"},
  44. drives_on={default=true},
  45. max_speed=30,
  46. seats = {
  47. {
  48. name=S("Driver Stand (right)"),
  49. attach_offset={x=5, y=-3, z=20},
  50. view_offset={x=5.2, y=-4, z=11},
  51. driving_ctrl_access=true,
  52. group = "dstand",
  53. },
  54. {
  55. name=S("Driver Stand (left)"),
  56. attach_offset={x=5, y=-3, z=-8},
  57. view_offset={x=-5.2, y=-4, z=0},
  58. driving_ctrl_access=true,
  59. group = "dstand",
  60. },
  61. },
  62. seat_groups = {
  63. dstand={
  64. name = "Driver Stand",
  65. access_to = {},
  66. driving_ctrl_access = true,
  67. },
  68. },
  69. assign_to_seat_group = {"dstand"},
  70. coupler_types_front = {chain=true},
  71. coupler_types_back = {chain=true},
  72. visual_size = {x=1, y=1},
  73. wagon_span=4,
  74. is_locomotive=true,
  75. collisionbox = {-1.0,-0.5,-1.0, 1.0,2.5,1.0},
  76. drops={"default:steelblock 4"},
  77. horn_sound = "advtrains_industrial_horn",
  78. }, S("Big Industrial Train Engine"), "advtrains_engine_industrial_inv.png")
  79. advtrains.register_wagon("wagon_tank", {
  80. mesh="advtrains_wagon_tank.b3d",
  81. textures = {"advtrains_wagon_tank.png"},
  82. seats = {},
  83. drives_on={default=true},
  84. max_speed=20,
  85. coupler_types_front = {chain=true},
  86. coupler_types_back = {chain=true},
  87. visual_size = {x=1, y=1},
  88. wagon_span=2.2,
  89. collisionbox = {-1.0,-0.5,-1.0, 1.0,2.5,1.0},
  90. drops={"default:steelblock 4"},
  91. has_inventory = true,
  92. get_inventory_formspec = advtrains.standard_inventory_formspec,
  93. inventory_list_sizes = {
  94. box=8*3,
  95. },
  96. techage_liquid_capacity = 1000,
  97. }, S("Industrial tank wagon"), "advtrains_wagon_tank_inv.png")
  98. advtrains.register_wagon("wagon_wood", {
  99. mesh="advtrains_wagon_wood.b3d",
  100. textures = {"advtrains_wagon_wood.png"},
  101. seats = {},
  102. drives_on={default=true},
  103. max_speed=20,
  104. coupler_types_front = {chain=true},
  105. coupler_types_back = {chain=true},
  106. visual_size = {x=1, y=1},
  107. wagon_span=1.8,
  108. collisionbox = {-1.0,-0.5,-1.0, 1.0,2.5,1.0},
  109. drops={"default:steelblock 4"},
  110. has_inventory = true,
  111. get_inventory_formspec = advtrains.standard_inventory_formspec,
  112. inventory_list_sizes = {
  113. box=8*3,
  114. },
  115. }, S("Industrial wood wagon"), "advtrains_wagon_wood_inv.png")
  116. -- Craftings
  117. minetest.register_craft({
  118. output = 'advtrains:engine_industrial',
  119. recipe = {
  120. {'default:steelblock', 'default:steelblock', 'default:steelblock'},
  121. {'advtrains:driver_cab', 'default:steelblock', 'default:steelblock'},
  122. {'advtrains:wheel', '', 'advtrains:wheel'},
  123. },
  124. })
  125. --Engine Industrial Big
  126. minetest.register_craft({
  127. output = 'advtrains:engine_industrial_big',
  128. recipe = {
  129. {'default:glass', 'default:steelblock', 'default:steelblock'},
  130. {'advtrains:driver_cab', 'default:steelblock', 'default:steelblock'},
  131. {'advtrains:wheel', 'advtrains:wheel', 'advtrains:wheel'},
  132. },
  133. })
  134. --Industrial tank wagon
  135. minetest.register_craft({
  136. output = 'advtrains:wagon_tank',
  137. recipe = {
  138. {'default:steelblock', 'default:steel_ingot', 'default:steelblock'},
  139. {'advtrains:steelblock', '', 'default:steelblock'},
  140. {'advtrains:wheel', 'default:steelblock', 'advtrains:wheel'},
  141. },
  142. })
  143. --Industrial wood wagon
  144. minetest.register_craft({
  145. output = 'advtrains:wagon_wood',
  146. recipe = {
  147. {'default:steel_ingot', '', 'default:steel_ingot'},
  148. {'advtrains:steelblock', 'default:steelblock', 'default:steelblock'},
  149. {'advtrains:wheel', '', 'advtrains:wheel'},
  150. },
  151. })