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