Try to track down why ATC is broken

master
orwell96 2020-05-18 11:47:22 +02:00
parent aee7f0d419
commit 227a4aaeac
1 changed files with 4 additions and 2 deletions

View File

@ -30,7 +30,7 @@ function atc.train_set_command(train, command, arrow)
train.atc_command = command
end
function atc.send_command(pos, par_tid)
function atc.send_command(pos, par_tid, train_id_temp_debug)
local pts=minetest.pos_to_string(pos)
if atc.controllers[pts] then
--atprint("Called send_command at "..pts)
@ -72,6 +72,8 @@ function atc.send_command(pos, par_tid)
end
else
atwarn("ATC rail at", pos, ": Sending command failed: There's no train at this position. This seems to be a bug.")
-- huch
advtrains.path_print(advtrains.trains[train_id_temp_debug], atdebug)
end
else
atwarn("ATC rail at", pos, ": Sending command failed: Entry for controller not found.")
@ -154,7 +156,7 @@ advtrains.atc_function = function(def, preset, suffix, rotation)
end,
advtrains = {
on_train_enter = function(pos, train_id)
atc.send_command(pos)
atc.send_command(pos, nil, train_id)
end,
},
}