diff options
author | orwell96 <orwell@bleipb.de> | 2018-08-13 11:27:38 +0200 |
---|---|---|
committer | orwell96 <orwell@bleipb.de> | 2018-08-13 11:27:38 +0200 |
commit | 5fad61e9c981115a183527ffe58a7bbe26fea4e7 (patch) | |
tree | 7cae4779164491e1acac7189d7108c4130d710c6 /advtrains_interlocking/routesetting.lua | |
parent | 3dc5b28774670b3c7b505f3f6f9603ba683a299e (diff) | |
download | advtrains-5fad61e9c981115a183527ffe58a7bbe26fea4e7.tar.gz advtrains-5fad61e9c981115a183527ffe58a7bbe26fea4e7.tar.bz2 advtrains-5fad61e9c981115a183527ffe58a7bbe26fea4e7.zip |
Fix various bugs found while testing
Diffstat (limited to 'advtrains_interlocking/routesetting.lua')
-rw-r--r-- | advtrains_interlocking/routesetting.lua | 6 |
1 files changed, 4 insertions, 2 deletions
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) |