From: PilzAdam Date: Sun, 7 Dec 2014 20:29:54 +0000 (+0100) Subject: Only allow rotating nodes that could be dug X-Git-Tag: 0.4.11~4 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=697b39d40dfe7a36b4487ddbb0ba3eb758df4714;p=oweals%2Fminetest_game.git Only allow rotating nodes that could be dug --- diff --git a/mods/screwdriver/init.lua b/mods/screwdriver/init.lua index 4aadaa0a..49ea6156 100644 --- a/mods/screwdriver/init.lua +++ b/mods/screwdriver/init.lua @@ -32,6 +32,10 @@ local function screwdriver_handler(itemstack, user, pointed_thing, mode) return end + if ndef.can_dig and not ndef.can_dig(pos, user) then + return + end + -- Set param2 local n = node.param2 local axisdir = math.floor(n / 4)