Commit d3958f21 authored by Fedja Beader's avatar Fedja Beader
Browse files

oresaw: use the Logger class

parent 4e325b18
......@@ -20,6 +20,8 @@ along with this program. If not, see <>.
Refuse to dig certain nodes with anything but ore saws.
local l = Logger:new("oresaw")
local ore_saw_nodes = {
......@@ -75,10 +77,10 @@ core.register_on_punchnode(function(pos, node)
or find_item_index(my_inv["main"], "terumet:tool_ore_saw")
if not saw_index then
print("Use ore-saw on ore blocks, cowardly refusing to dig.")
l:err("Use ore-saw on ore blocks, cowardly refusing to dig.")
return true -- do not start digging
print("Using ore-saw at index " .. tostring(saw_index))
l:debug("Using ore-saw at index " .. tostring(saw_index))
local old_index = core.get_wield_index()
core.use_item(pos, vector.add(pos,, 1, 0)))
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment