mirror of
https://github.com/minetest-mods/technic.git
synced 2024-11-15 23:10:41 +01:00
provide "lag" info in switching station digiline response
This commit is contained in:
parent
4a6d6f6644
commit
7c0d0a2041
|
@ -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
|
||||
},
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user