diff options
author | autocommitter <autocommitter@linux-forks.de> | 2024-04-22 14:56:58 +0200 |
---|---|---|
committer | autocommitter <autocommitter@linux-forks.de> | 2024-04-22 14:56:58 +0200 |
commit | aeea70df13db7d77ce2ce1075cbd14dc1c3797fc (patch) | |
tree | 0b95d7adcbc6f128ce1528d6e965c926bb725fb1 /durt/nodes/(-3590,8,-2277).lua | |
parent | 4062f8447ce4eaa550613c41d3251c473522c201 (diff) | |
download | luaatc_envs-aeea70df13db7d77ce2ce1075cbd14dc1c3797fc.tar.gz luaatc_envs-aeea70df13db7d77ce2ce1075cbd14dc1c3797fc.tar.bz2 luaatc_envs-aeea70df13db7d77ce2ce1075cbd14dc1c3797fc.zip |
State at 2022-04-19
Diffstat (limited to 'durt/nodes/(-3590,8,-2277).lua')
-rw-r--r-- | durt/nodes/(-3590,8,-2277).lua | 44 |
1 files changed, 1 insertions, 43 deletions
diff --git a/durt/nodes/(-3590,8,-2277).lua b/durt/nodes/(-3590,8,-2277).lua index 358f6c2..7489acc 100644 --- a/durt/nodes/(-3590,8,-2277).lua +++ b/durt/nodes/(-3590,8,-2277).lua @@ -1,43 +1 @@ -local dir = "west" -local split_indicators = {east=POS(-3559,9,-2282),west=POS(-3592,9,-2282)} -local loco_indicators = {east=POS(-3540,8,-2278),west=POS(-3593,8,-2277)} - -local inv_dir = (dir=="east" and "west" or "east") - -__approach_callback_mode = 1 -if event.approach and not event.has_entered then - atc_set_lzb_tsr(1) -end - -if event.train then -print(tostring(atc_arrow)) - local train_dir = F.get_rc_safe():match("Treefarm_headshunt_(%a%a%a%a)") - if not train_dir then return end -- ignore this train completely - if not atc_arrow then return end--nothing to do with this train yet - -print(train_dir.." "..dir) - if train_dir == dir then --train is matching arrow and has already bounced, split and let it pass - if getstate(split_indicators[dir]) == "red" then --there's an error somewhere, shouldn't get to this - print("error1") - return - end - if not F.get_rc_safe():match("Treefarm_collect") then - split_off_locomotive("A0B0",1) - atc_send("A1S3") - end - F.remove_rc({"Treefarm_loading"}) - set_rc(F.get_rc_safe().." Treefarm_rejoin_"..dir) - elseif train_dir == inv_dir then -- bounce the train -print("bounce") - if getstate(split_indicators[inv_dir]) == "red" then --there's an error somewhere, shouldn't get to this - print("error2") - return - end - set_rc(F.get_rc_safe().." Treefarm_collect") -print(F.get_rc_safe()) - atc_reset() - atc_send("S2D2S0WRS3") -print("do the bounce") - return - end -end
\ No newline at end of file +--
\ No newline at end of file |