summaryrefslogtreecommitdiff
path: root/far/nodes/(30785,15,1711).lua
diff options
context:
space:
mode:
Diffstat (limited to 'far/nodes/(30785,15,1711).lua')
-rw-r--r--far/nodes/(30785,15,1711).lua21
1 files changed, 21 insertions, 0 deletions
diff --git a/far/nodes/(30785,15,1711).lua b/far/nodes/(30785,15,1711).lua
new file mode 100644
index 0000000..06bdb5c
--- /dev/null
+++ b/far/nodes/(30785,15,1711).lua
@@ -0,0 +1,21 @@
+-- far_luaatctrack_findopenroute_01.lua
+local signal_pos = "FareastEndEntrySignal"
+local last_route = "3"
+local proposed_route_name = ""
+
+if event.type == "train" then
+ if not atc_id then return end
+ if atc_arrow then
+ atc_send("B0")
+ end
+ for i = 1, last_route, 1 do
+ l = tostring(i)
+ proposed_route_name = "Far East End (Platform " .. l .. ")"
+ if can_set_route(signal_pos, proposed_route_name) then
+ set_route(signal_pos, proposed_route_name)
+ F.print("Train ID " .. atc_id .. " going on " .. proposed_route_name)
+ atc_send("SM")
+ end
+ end
+end
+