Included chest textures, tidied code

This commit is contained in:
TenPlus1 2017-05-06 18:23:18 +01:00
parent 8dea715303
commit cbf72118d9
4 changed files with 6 additions and 10 deletions

@ -173,15 +173,13 @@ end
protector.can_dig = function(r, pos, digger, onlyowner, infolevel)
if not digger
or not pos then
if not digger or not pos then
return false
end
-- delprotect and protector_bypass privileged users can override protection
if ( minetest.check_player_privs(digger, {delprotect = true})
or minetest.check_player_privs(digger, {protection_bypass = true}) )
and infolevel == 1 then
-- protector_bypass privileged users can override protection
if infolevel == 1
and minetest.check_player_privs(digger, {protection_bypass = true}) then
return true
end
@ -213,12 +211,10 @@ protector.can_dig = function(r, pos, digger, onlyowner, infolevel)
members = meta:get_string("members") or ""
-- node change and digger isn't owner
if owner ~= digger
and infolevel == 1 then
if infolevel == 1 and owner ~= digger then
-- and you aren't on the member list
if onlyowner
or not protector.is_member(meta, digger) then
if onlyowner or not protector.is_member(meta, digger) then
minetest.chat_send_player(digger,
S("This area is owned by @1!", owner))

Binary file not shown.

After

Width:  |  Height:  |  Size: 421 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 375 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 418 B