diff options
author | orwell96 <mono96.mml@gmail.com> | 2017-11-01 21:50:47 +0100 |
---|---|---|
committer | orwell96 <orwell@bleipb.de> | 2017-12-18 23:26:01 +0100 |
commit | 8a51a10a61626c2190b32f06a52dbe20cdf1d04c (patch) | |
tree | 63ad2052281f7e4d9b6d09bf0812affc96e5f56b | |
parent | 09838252fe11672d89eb00d1da13b15a293ad230 (diff) | |
download | advtrains-8a51a10a61626c2190b32f06a52dbe20cdf1d04c.tar.gz advtrains-8a51a10a61626c2190b32f06a52dbe20cdf1d04c.tar.bz2 advtrains-8a51a10a61626c2190b32f06a52dbe20cdf1d04c.zip |
Fix detector lookup in ATC rails
-rw-r--r-- | advtrains/atc.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/advtrains/atc.lua b/advtrains/atc.lua index bdcf144..10321d9 100644 --- a/advtrains/atc.lua +++ b/advtrains/atc.lua @@ -25,7 +25,7 @@ function atc.send_command(pos, par_tid) local pts=minetest.pos_to_string(pos) if atc.controllers[pts] then --atprint("Called send_command at "..pts) - local train_id = par_tid or advtrains.detector.on_node[pts] + local train_id = par_tid or advtrains.detector.get(pos) if train_id then if advtrains.trains[train_id] then --atprint("send_command inside if: "..sid(train_id)) @@ -126,7 +126,7 @@ advtrains.atc_function = function(def, preset, suffix, rotation) local pts=minetest.pos_to_string(pos) local _, conns=advtrains.get_rail_info_at(pos, advtrains.all_tracktypes) atc.controllers[pts]={command=fields.command, arrowconn=conns[1].c} - if advtrains.detector.on_node[pts] then + if advtrains.detector.get(pos) then atc.send_command(pos) end end |