diff --git a/technic/machines/switching_station.lua b/technic/machines/switching_station.lua index cc8f297..7e42d14 100644 --- a/technic/machines/switching_station.lua +++ b/technic/machines/switching_station.lua @@ -85,7 +85,8 @@ minetest.register_node("technic:switching_station",{ end digilines.receptor_send(pos, technic.digilines.rules, channel, { supply = meta:get_int("supply"), - demand = meta:get_int("demand") + demand = meta:get_int("demand"), + lag = meta:get_int("lag") }) end }, diff --git a/technic/machines/switching_station_globalstep.lua b/technic/machines/switching_station_globalstep.lua index 8c72520..2ff746b 100644 --- a/technic/machines/switching_station_globalstep.lua +++ b/technic/machines/switching_station_globalstep.lua @@ -103,6 +103,9 @@ minetest.register_globalstep(function(dtime) local meta = minetest.get_meta(pos) + -- set lag in microseconds into the "lag" meta field + meta:set_int("lag", switch_diff) + -- overload detection if switch_diff > 250000 then switch.skip = 30