Revert "Revert "Revert "remove monitoring code and deps"""

This reverts commit 2a07854bd337e918ea9e60d08b42b7dbe09b2433.
This commit is contained in:
Thomas Rudin
2019-04-29 21:26:20 +02:00
parent b89eee3b68
commit 6059ec8aeb
3 changed files with 16 additions and 0 deletions

View File

@ -4,6 +4,15 @@ local S = technic.getter
local tube_entry = "^pipeworks_tube_connection_metallic.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({
recipe = {
{"technic:carbon_plate", "pipeworks:filter", "technic:composite_plate"},
@ -135,6 +144,9 @@ local function quarry_handle_purge(pos)
end
local function quarry_run(pos, node)
if metric_dig_count ~= nil then
metric_dig_count.inc()
end
local meta = minetest.get_meta(pos)
local owner = meta:get_string("owner")