quarry dig count metric

This commit is contained in:
NatureFreshMilk 2019-03-04 09:06:54 +01:00
parent 59b297fa23
commit 7a32be742c

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,10 @@ 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")