From ff9412976154f60982e3a2f32108e36a1fd61635 Mon Sep 17 00:00:00 2001 From: orwell96 Date: Tue, 23 Apr 2019 22:30:33 +0200 Subject: Fix occurences of old lzb_invalidate --- advtrains/wagons.lua | 8 ++------ advtrains_luaautomation/atc_rail.lua | 8 ++------ 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/advtrains/wagons.lua b/advtrains/wagons.lua index 12fd74e..b67449d 100644 --- a/advtrains/wagons.lua +++ b/advtrains/wagons.lua @@ -885,9 +885,7 @@ function wagon:handle_bordcom_fields(pname, formname, fields) if fields.line~="" then if fields.line ~= train.line then train.line=fields.line - if advtrains.interlocking then - advtrains.interlocking.lzb_invalidate(train) - end + minetest.after(0, advtrains.invalidate_path, train.id) end else train.line=nil @@ -897,9 +895,7 @@ function wagon:handle_bordcom_fields(pname, formname, fields) if fields.routingcode~="" then if fields.routingcode ~= train.routingcode then train.routingcode=fields.routingcode - if advtrains.interlocking then - advtrains.interlocking.lzb_invalidate(train) - end + minetest.after(0, advtrains.invalidate_path, train.id) end else train.routingcode=nil diff --git a/advtrains_luaautomation/atc_rail.lua b/advtrains_luaautomation/atc_rail.lua index f4b3337..bc1e00e 100644 --- a/advtrains_luaautomation/atc_rail.lua +++ b/advtrains_luaautomation/atc_rail.lua @@ -58,9 +58,7 @@ function r.fire_event(pos, evtdata) return false end train.line = line .. "" - if advtrains.interlocking then - advtrains.interlocking.lzb_invalidate(train) - end + minetest.after(0, advtrains.invalidate_path, train_id) return true end, get_line = function() @@ -71,9 +69,7 @@ function r.fire_event(pos, evtdata) return false end train.routingcode = rc - if advtrains.interlocking then - advtrains.interlocking.lzb_invalidate(train) - end + minetest.after(0, advtrains.invalidate_path, train_id) return true end, get_rc = function() -- cgit v1.2.3