summaryrefslogtreecommitdiff
path: root/durt/nodes/(-4135,16,-5809).lua
diff options
context:
space:
mode:
authorautocommitter <autocommitter@linux-forks.de>2024-04-22 14:56:42 +0200
committerautocommitter <autocommitter@linux-forks.de>2024-04-22 14:56:42 +0200
commit67cf6aa5ec027ccf1e9a414486258c892e7dc1c3 (patch)
tree8da766116cb43a51cf07e42815c10d070ae42032 /durt/nodes/(-4135,16,-5809).lua
parent25df7958b37a5381ca068bbcc71a91521c702e6b (diff)
downloadluaatc_envs-67cf6aa5ec027ccf1e9a414486258c892e7dc1c3.tar.gz
luaatc_envs-67cf6aa5ec027ccf1e9a414486258c892e7dc1c3.tar.bz2
luaatc_envs-67cf6aa5ec027ccf1e9a414486258c892e7dc1c3.zip
State at 2022-03-28
Diffstat (limited to 'durt/nodes/(-4135,16,-5809).lua')
-rw-r--r--durt/nodes/(-4135,16,-5809).lua27
1 files changed, 27 insertions, 0 deletions
diff --git a/durt/nodes/(-4135,16,-5809).lua b/durt/nodes/(-4135,16,-5809).lua
new file mode 100644
index 0000000..28ae5f2
--- /dev/null
+++ b/durt/nodes/(-4135,16,-5809).lua
@@ -0,0 +1,27 @@
+local split_indicator = POS(-4134,17,-5811)
+__approach_callback_mode = 1
+
+if event.approach and not event.has_entered then
+ if not F.has_rc("DLG_ArcRun") then return end
+
+ atc_set_ars_disable(true)
+ atc_set_lzb_tsr(1)
+end
+
+if event.train then
+ if not F.has_rc("DLG_ArcRun") then return end
+ if not atc_arrow then return end
+ local state = getstate(split_indicator)
+ if state == "red" then
+ split_off_locomotive("A0B0OL",1)
+ atc_send("S3")
+ atc_set_ars_disable(false)
+ setstate(split_indicator,"green")
+ set_rc(F.get_rc_safe().." DLG_south_reverse DLG_around_long DLG_north_reverse DLG_north_reverse_couple DLG_shunt_platforms DLG_shunt_Freight2")
+ elseif state == "green" then
+ atc_send("B0WROCA1D2S4")
+ setstate(split_indicator,"red")
+ F.remove_rc({"DLG_south_reverse","DLG_around_long","DLG_north_reverse_couple","DLG_shunt_Freight2"})
+ set_rc(F.get_rc_safe().." DLG_shunt_Freight4")
+ end
+end \ No newline at end of file