From 7a32be742cd88f1767521223387a7e22e7d3fc0c Mon Sep 17 00:00:00 2001 From: NatureFreshMilk Date: Mon, 4 Mar 2019 09:06:54 +0100 Subject: [PATCH] quarry dig count metric --- technic/machines/HV/quarry.lua | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/technic/machines/HV/quarry.lua b/technic/machines/HV/quarry.lua index 79d652b..74fec66 100644 --- a/technic/machines/HV/quarry.lua +++ b/technic/machines/HV/quarry.lua @@ -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")