Allow digging of protected doors with "protection_bypass"
authorAuke Kok <sofar@foo-projects.org>
Wed, 16 Mar 2016 05:49:20 +0000 (22:49 -0700)
committerparamat <mat.gregory@virginmedia.com>
Fri, 18 Mar 2016 02:35:20 +0000 (02:35 +0000)
This was probably lost in either the API rewrite or a merge/rebase.

Fixes #929

mods/doors/init.lua

index 431eab3b462f49826e0e8f173782df2df37c2b21..dd7ab726dbdb83fe62a55834632159e8f85b5a4d 100644 (file)
@@ -287,6 +287,9 @@ function doors.register(name, def)
                if not def.protected then
                        return true
                end
+               if minetest.check_player_privs(digger, "protection_bypass") then
+                       return true
+               end
                local meta = minetest.get_meta(pos)
                local name = ""
                if digger then