summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTenPlus1 <kinsellaja@yahoo.com>2017-05-06 18:23:18 +0100
committerTenPlus1 <kinsellaja@yahoo.com>2017-05-06 18:23:18 +0100
commitcbf72118d9eed3de00aeaba5212750dae428b482 (patch)
tree9c310349928bb9e23cbab8f41250d2e1c26d6d45
parent8dea715303a2d800ff638716c62436a86177b30f (diff)
Included chest textures, tidied code
-rw-r--r--init.lua16
-rw-r--r--textures/default_chest_front.pngbin0 -> 421 bytes
-rw-r--r--textures/default_chest_side.pngbin0 -> 375 bytes
-rw-r--r--textures/default_chest_top.pngbin0 -> 418 bytes
4 files changed, 6 insertions, 10 deletions
diff --git a/init.lua b/init.lua
index 09c10d6..0441ad6 100644
--- a/init.lua
+++ b/init.lua
@@ -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))
diff --git a/textures/default_chest_front.png b/textures/default_chest_front.png
new file mode 100644
index 0000000..f413279
--- /dev/null
+++ b/textures/default_chest_front.png
Binary files differ
diff --git a/textures/default_chest_side.png b/textures/default_chest_side.png
new file mode 100644
index 0000000..44a65a4
--- /dev/null
+++ b/textures/default_chest_side.png
Binary files differ
diff --git a/textures/default_chest_top.png b/textures/default_chest_top.png
new file mode 100644
index 0000000..1fbdbb9
--- /dev/null
+++ b/textures/default_chest_top.png
Binary files differ