aboutsummaryrefslogtreecommitdiff
path: root/advtrains_interlocking/init.lua
diff options
context:
space:
mode:
Diffstat (limited to 'advtrains_interlocking/init.lua')
-rw-r--r--advtrains_interlocking/init.lua30
1 files changed, 30 insertions, 0 deletions
diff --git a/advtrains_interlocking/init.lua b/advtrains_interlocking/init.lua
new file mode 100644
index 0000000..a2f5882
--- /dev/null
+++ b/advtrains_interlocking/init.lua
@@ -0,0 +1,30 @@
+-- Advtrains interlocking system
+-- See database.lua for a detailed explanation
+
+advtrains.interlocking = {}
+
+advtrains.SHUNT_SPEED_MAX = 6
+
+function advtrains.interlocking.sigd_equal(sigd, cmp)
+ return vector.equals(sigd.p, cmp.p) and sigd.s==cmp.s
+end
+
+
+local modpath = minetest.get_modpath(minetest.get_current_modname()) .. DIR_DELIM
+
+dofile(modpath.."database.lua")
+dofile(modpath.."signal_api.lua")
+dofile(modpath.."demosignals.lua")
+dofile(modpath.."train_sections.lua")
+dofile(modpath.."route_prog.lua")
+dofile(modpath.."routesetting.lua")
+dofile(modpath.."tcb_ts_ui.lua")
+dofile(modpath.."route_ui.lua")
+dofile(modpath.."tool.lua")
+
+dofile(modpath.."approach.lua")
+dofile(modpath.."ars.lua")
+dofile(modpath.."tsr_rail.lua")
+
+
+minetest.register_privilege("interlocking", {description = "Can set up track sections, routes and signals.", give_to_singleplayer = true})