mirror of
https://github.com/minetest-mods/technic.git
synced 2024-09-28 23:30:42 +02:00
quarry dig count metric
This commit is contained in:
parent
59b297fa23
commit
7a32be742c
|
@ -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")
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user