function sparktech.register_wrench(name, dictionary)
	local on_place = function(itemstack, placer, pointed_thing)
		if pointed_thing["type"] == "node" then
			if not sparktech.dig_node then dofile("./dig.lua") end

			if minetest.get_item_group(minetest.get_node(pointed_thing["under"])["name"], "sparktech_techy") > 0 then
				sparktech.dig_node(pointed_thing["under"], placer:get_inventory(), "main", false, placer)
			end
		end
		return itemstack
	end
	if dictionary["on_use"] == nil then
		dictionary["on_use"] = on_use
	end
	if dictionary["on_place"] == nil then
		dictionary["on_place"] = on_place
	end

	minetest.register_tool(name, dictionary)
end
