From 46c4447da089146c662f217bf3269d78d4c462c2 Mon Sep 17 00:00:00 2001 From: orwell96 Date: Mon, 18 Dec 2017 21:44:36 +0100 Subject: Rewrite rail connection system... ...to support an arbitrary number of connections for rails, which leads to these new features: - switches now get recognized by the trackworker correctly - ability to add real rail crosses During this, I also rewrote the rail registering system and the conway function (important part of path prediction) Note, developers: the track preset format changed, you might need to rewrite them according to the presets in tracks.lua if you wrote your own (possibly breaks advcarts) --- advtrains_luaautomation/atc_rail.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'advtrains_luaautomation/atc_rail.lua') diff --git a/advtrains_luaautomation/atc_rail.lua b/advtrains_luaautomation/atc_rail.lua index b90baf8..3313401 100644 --- a/advtrains_luaautomation/atc_rail.lua +++ b/advtrains_luaautomation/atc_rail.lua @@ -107,8 +107,8 @@ advtrains.register_tracks("default", { --set arrowconn (for ATC) local ph=minetest.pos_to_string(pos) - local _, conn1=advtrains.get_rail_info_at(pos, advtrains.all_tracktypes) - atlatc.active.nodes[ph].arrowconn=conn1 + local _, conns=advtrains.get_rail_info_at(pos, advtrains.all_tracktypes) + atlatc.active.nodes[ph].arrowconn=conns[1].c end, advtrains = { -- cgit v1.2.3