mirror of
https://github.com/minetest-mods/technic.git
synced 2025-07-02 00:00:37 +02:00
Revert "Revert "Revert "remove monitoring code and deps"""
This reverts commit 2a07854bd337e918ea9e60d08b42b7dbe09b2433.
This commit is contained in:
@ -12,3 +12,4 @@ intllib?
|
|||||||
unified_inventory?
|
unified_inventory?
|
||||||
vector_extras?
|
vector_extras?
|
||||||
dye?
|
dye?
|
||||||
|
monitoring?
|
||||||
|
@ -4,6 +4,15 @@ local S = technic.getter
|
|||||||
local tube_entry = "^pipeworks_tube_connection_metallic.png"
|
local tube_entry = "^pipeworks_tube_connection_metallic.png"
|
||||||
local cable_entry = "^technic_cable_connection_overlay.png"
|
local cable_entry = "^technic_cable_connection_overlay.png"
|
||||||
|
|
||||||
|
local has_monitoring = minetest.get_modpath("monitoring")
|
||||||
|
local metric_dig_count
|
||||||
|
|
||||||
|
if has_monitoring then
|
||||||
|
metric_dig_count = monitoring.counter("technic_quarry_dig_count",
|
||||||
|
"number of technic quarry digs")
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
recipe = {
|
recipe = {
|
||||||
{"technic:carbon_plate", "pipeworks:filter", "technic:composite_plate"},
|
{"technic:carbon_plate", "pipeworks:filter", "technic:composite_plate"},
|
||||||
@ -135,6 +144,9 @@ local function quarry_handle_purge(pos)
|
|||||||
end
|
end
|
||||||
|
|
||||||
local function quarry_run(pos, node)
|
local function quarry_run(pos, node)
|
||||||
|
if metric_dig_count ~= nil then
|
||||||
|
metric_dig_count.inc()
|
||||||
|
end
|
||||||
|
|
||||||
local meta = minetest.get_meta(pos)
|
local meta = minetest.get_meta(pos)
|
||||||
local owner = meta:get_string("owner")
|
local owner = meta:get_string("owner")
|
||||||
|
@ -433,6 +433,7 @@ minetest.register_abm({
|
|||||||
minetest.log("warning", "[technic] [+supply] switching station abm took " .. diff .. " us at " .. minetest.pos_to_string(pos))
|
minetest.log("warning", "[technic] [+supply] switching station abm took " .. diff .. " us at " .. minetest.pos_to_string(pos))
|
||||||
end
|
end
|
||||||
|
|
||||||
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
-- If the PR supply is not enough for the RE demand we will discharge the batteries too
|
-- If the PR supply is not enough for the RE demand we will discharge the batteries too
|
||||||
@ -462,6 +463,7 @@ minetest.register_abm({
|
|||||||
minetest.log("warning", "[technic] [-supply] switching station abm took " .. diff .. " us at " .. minetest.pos_to_string(pos))
|
minetest.log("warning", "[technic] [-supply] switching station abm took " .. diff .. " us at " .. minetest.pos_to_string(pos))
|
||||||
end
|
end
|
||||||
|
|
||||||
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
-- If the PR+BA supply is not enough for the RE demand: Power only the batteries
|
-- If the PR+BA supply is not enough for the RE demand: Power only the batteries
|
||||||
@ -486,6 +488,7 @@ minetest.register_abm({
|
|||||||
minetest.log("warning", "[technic] switching station abm took " .. diff .. " us at " .. minetest.pos_to_string(pos))
|
minetest.log("warning", "[technic] switching station abm took " .. diff .. " us at " .. minetest.pos_to_string(pos))
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user