From e09fc154d6ee59ccf53c65858f52be0a2a5c84e0 Mon Sep 17 00:00:00 2001 From: AndrejIT Date: Sun, 16 Apr 2017 09:56:10 +0300 Subject: [PATCH] Fix tnt bug. Fix delprotect priv. --- init.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/init.lua b/init.lua index 8a7cb91..a25b02c 100644 --- a/init.lua +++ b/init.lua @@ -121,11 +121,15 @@ function minetest.is_protected(pos, player_name) local node = minetest.get_node(pos); --can dig asphalt only from corners if node.name == "asphalt:asphalt" then + --tnt and other things also cannot destroy asphalt + if player_name == nil then + return true + end -- Delprotect privilege (works only if declared by protection mod) if minetest.get_player_privs(player_name).delprotect then local player = minetest.get_player_by_name(player_name); if player:get_player_control().sneak then - return true + return false end end if not can_dig_asphalt(pos) then