diff options
author | orwell <orwell@bleipb.de> | 2024-11-25 22:31:26 +0100 |
---|---|---|
committer | orwell <orwell@bleipb.de> | 2024-11-25 22:31:26 +0100 |
commit | 922e654b7bef51c7ddaf510ec70880d48181dd35 (patch) | |
tree | 3d12820d7a67180df3d2bd36d3fa7b4d61c1166c /advtrains_interlocking/route_prog.lua | |
parent | 73c393e223b1d2d81b767d8036c7fdec7ca20100 (diff) | |
download | advtrains-922e654b7bef51c7ddaf510ec70880d48181dd35.tar.gz advtrains-922e654b7bef51c7ddaf510ec70880d48181dd35.tar.bz2 advtrains-922e654b7bef51c7ddaf510ec70880d48181dd35.zip |
Make Buffers become implicitly their own TCBs and signals when interlocking is enabled
Diffstat (limited to 'advtrains_interlocking/route_prog.lua')
-rw-r--r-- | advtrains_interlocking/route_prog.lua | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/advtrains_interlocking/route_prog.lua b/advtrains_interlocking/route_prog.lua index 2f0f8ee..3bdf6d6 100644 --- a/advtrains_interlocking/route_prog.lua +++ b/advtrains_interlocking/route_prog.lua @@ -535,9 +535,12 @@ minetest.register_on_punchnode(function(pos, node, player, pointed_thing) -- show formspec show_routing_form(pname, tcbpos) - advtrains.interlocking.visualize_route(rp.origin, rp.route, "prog_"..pname, rp.tmp_lcks, pname) - + return + elseif advtrains.interlocking.database.get_tcb(pos) then + -- the punched node itself is a TCB + show_routing_form(pname, pos) + advtrains.interlocking.visualize_route(rp.origin, rp.route, "prog_"..pname, rp.tmp_lcks, pname) return end if advtrains.is_passive(pos) then |