Included chest textures, tidied code
This commit is contained in:
parent
8dea715303
commit
cbf72118d9
16
init.lua
16
init.lua
@ -173,15 +173,13 @@ end
|
|||||||
|
|
||||||
protector.can_dig = function(r, pos, digger, onlyowner, infolevel)
|
protector.can_dig = function(r, pos, digger, onlyowner, infolevel)
|
||||||
|
|
||||||
if not digger
|
if not digger or not pos then
|
||||||
or not pos then
|
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
|
|
||||||
-- delprotect and protector_bypass privileged users can override protection
|
-- protector_bypass privileged users can override protection
|
||||||
if ( minetest.check_player_privs(digger, {delprotect = true})
|
if infolevel == 1
|
||||||
or minetest.check_player_privs(digger, {protection_bypass = true}) )
|
and minetest.check_player_privs(digger, {protection_bypass = true}) then
|
||||||
and infolevel == 1 then
|
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -213,12 +211,10 @@ protector.can_dig = function(r, pos, digger, onlyowner, infolevel)
|
|||||||
members = meta:get_string("members") or ""
|
members = meta:get_string("members") or ""
|
||||||
|
|
||||||
-- node change and digger isn't owner
|
-- node change and digger isn't owner
|
||||||
if owner ~= digger
|
if infolevel == 1 and owner ~= digger then
|
||||||
and infolevel == 1 then
|
|
||||||
|
|
||||||
-- and you aren't on the member list
|
-- and you aren't on the member list
|
||||||
if onlyowner
|
if onlyowner or not protector.is_member(meta, digger) then
|
||||||
or not protector.is_member(meta, digger) then
|
|
||||||
|
|
||||||
minetest.chat_send_player(digger,
|
minetest.chat_send_player(digger,
|
||||||
S("This area is owned by @1!", owner))
|
S("This area is owned by @1!", owner))
|
||||||
|
BIN
textures/default_chest_front.png
Normal file
BIN
textures/default_chest_front.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 421 B |
BIN
textures/default_chest_side.png
Normal file
BIN
textures/default_chest_side.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 375 B |
BIN
textures/default_chest_top.png
Normal file
BIN
textures/default_chest_top.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 418 B |
Loading…
x
Reference in New Issue
Block a user