From 5fad61e9c981115a183527ffe58a7bbe26fea4e7 Mon Sep 17 00:00:00 2001 From: orwell96 Date: Mon, 13 Aug 2018 11:27:38 +0200 Subject: Fix various bugs found while testing --- advtrains_interlocking/routesetting.lua | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'advtrains_interlocking/routesetting.lua') diff --git a/advtrains_interlocking/routesetting.lua b/advtrains_interlocking/routesetting.lua index bfcfee7..5947555 100644 --- a/advtrains_interlocking/routesetting.lua +++ b/advtrains_interlocking/routesetting.lua @@ -84,7 +84,7 @@ function ilrs.set_route(signal, route, try) if not try then atwarn("Encountered route lock while a real run of routesetting routine, at position",pts,"while setting route",rtename,"of",signal) end return false, "Lock conflict at "..pts..", Held locked by:\n"..confl, nil, pts elseif not try then - ndef.luaautomation.setstate(pos, state) + ndef.luaautomation.setstate(pos, node, state) end end if not try then @@ -181,7 +181,9 @@ function ilrs.free_route_locks_indiv(pts, ts, nocallbacks) end -- This must be delayed, because this code is executed in-between a train step -- TODO use luaautomation timers? - minetest.after(0, ilrs.update_waiting, "lck", pts) + if not nocallbacks then + minetest.after(0, ilrs.update_waiting, "lck", pts) + end end -- frees all route locks, even manual ones set with the tool, at a specific position function ilrs.remove_route_locks(pts, nocallbacks) -- cgit v1.2.3