2
0

init.lua 745 B

12345678910111213141516171819202122232425262728
  1. -- carts/init.lua
  2. -- Load support for MT game translation.
  3. local S = minetest.get_translator("carts")
  4. carts = {}
  5. carts.modpath = minetest.get_modpath("carts")
  6. carts.railparams = {}
  7. carts.get_translator = S
  8. -- Maximal speed of the cart in m/s (min = -1)
  9. carts.speed_max = 7
  10. -- Set to -1 to disable punching the cart from inside (min = -1)
  11. carts.punch_speed_max = 5
  12. -- Maximal distance for the path correction (for dtime peaks)
  13. carts.path_distance_max = 3
  14. dofile(carts.modpath.."/functions.lua")
  15. dofile(carts.modpath.."/rails.lua")
  16. dofile(carts.modpath.."/cart_entity.lua")
  17. -- Register rails as dungeon loot
  18. if minetest.global_exists("dungeon_loot") then
  19. dungeon_loot.register({
  20. name = "carts:rail", chance = 0.35, count = {1, 6}
  21. })
  22. end