From aea61be84d492848f0f7ba9b88571aae832aa6c4 Mon Sep 17 00:00:00 2001 From: rnd1 Date: Thu, 29 Sep 2016 23:05:05 +0200 Subject: [PATCH] .. --- init.lua | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/init.lua b/init.lua index 9cca15e..3ef3e01 100644 --- a/init.lua +++ b/init.lua @@ -123,12 +123,10 @@ end) -- long range dig check local check_can_dig = function(pos, digger) - minetest.chat_send_all("a") - --if pos.y>-32 then return end + local p = digger:getpos(); local dist = math.max(math.abs(p.x-pos.x),math.abs(p.y-pos.y),math.abs(p.z-pos.z)); - - minetest.chat_send_all("dist " .. dist) + if dist>5 then -- here 5 dist = math.floor(dist*100)/100; @@ -155,7 +153,6 @@ end minetest.after(0, function() - set_check_can_dig("default:stone"); set_check_can_dig("default:stone_with_iron"); set_check_can_dig("default:stone_with_copper"); set_check_can_dig("default:stone_with_coal");