aboutsummaryrefslogtreecommitdiff
path: root/advtrains/api_doc.txt
diff options
context:
space:
mode:
authororwell96 <orwell@bleipb.de>2018-11-29 17:52:56 +0100
committerorwell96 <orwell@bleipb.de>2018-11-29 17:52:56 +0100
commitec68eaa22975305af3e184bc3c946a253b5504eb (patch)
treebaf865eec03c343eacba73282d4fdbf377d26568 /advtrains/api_doc.txt
parent01ffee4d58316c74c90a36b491770ee358fd3f98 (diff)
downloadadvtrains-ec68eaa22975305af3e184bc3c946a253b5504eb.tar.gz
advtrains-ec68eaa22975305af3e184bc3c946a253b5504eb.tar.bz2
advtrains-ec68eaa22975305af3e184bc3c946a253b5504eb.zip
Added on_train_approach callback, non-permanent external LZB brakepoints and basis for "stop rails"
Stop rails ATM use the aforementioned things to add a pointwise "2" speed restriction. Seems to work.
Diffstat (limited to 'advtrains/api_doc.txt')
-rw-r--r--advtrains/api_doc.txt5
1 files changed, 5 insertions, 0 deletions
diff --git a/advtrains/api_doc.txt b/advtrains/api_doc.txt
index 7bd9c44..d16a611 100644
--- a/advtrains/api_doc.txt
+++ b/advtrains/api_doc.txt
@@ -178,5 +178,10 @@ minetest.register_node(nodename, {
^- called when a train enters the rail
on_train_leave=function(pos, train_id) end
^- called when a train leaves the rail
+
+ -- The following function is only in effect when interlocking is enabled:
+ on_train_approach = function(pos, train_id, train, index)
+ ^- called when a train is approaching this position, called exactly once for every path recalculation (which can happen at any time)
+ ^- This is called so that if the train would start braking now, it would come to halt about(wide approx) 5 nodes before the rail.
}
})