From cbf72118d9eed3de00aeaba5212750dae428b482 Mon Sep 17 00:00:00 2001 From: TenPlus1 Date: Sat, 6 May 2017 18:23:18 +0100 Subject: [PATCH] Included chest textures, tidied code --- init.lua | 16 ++++++---------- textures/default_chest_front.png | Bin 0 -> 421 bytes textures/default_chest_side.png | Bin 0 -> 375 bytes textures/default_chest_top.png | Bin 0 -> 418 bytes 4 files changed, 6 insertions(+), 10 deletions(-) create mode 100644 textures/default_chest_front.png create mode 100644 textures/default_chest_side.png create mode 100644 textures/default_chest_top.png 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 0000000000000000000000000000000000000000..f4132794d52be74ba00fc1a05fd403fac4ae7277 GIT binary patch literal 421 zcmV;W0b2fvP)i&K4LJ(h4fd|)}Lf=h&H zLXT)Oby_pmu656)Y`~XZu7*#Kb4!G4MT>1goOVBpWiV}2FKSRK-QC@|u%qC!dc~Y& zzLs61d_{+CM1p2Nz__cUqocE{p6j=Mc6N54fmoDxPm^{|mw8KwZcBJ!K5tn$lWaGU zYBh#mEPz=jWJ@J{RU=tkP^|y}0J2F$K~xwSZNWui!!Q5@z?Cd!Guz>$%=G_{wfA%e z*WN;vk})QQ^Dw*s2*+GX-?@VoV&4O(j+y0L)b(z6#|Hp~%T?|vrG%)s;vZGT7RJ8U z#VjTn08d=l*A4O8LORI+u!*?S_Wowm^QL|PkSL}3czbz1*uCfhoSi3%jH8!XCQkrD zoBe59D|pj90$3wagb+2UuA>0}i+V2Kwbn6Cv;e?#`SbNTmmlSx#8izWM; P00000NkvXXu0mjfwQRVu literal 0 HcmV?d00001 diff --git a/textures/default_chest_side.png b/textures/default_chest_side.png new file mode 100644 index 0000000000000000000000000000000000000000..44a65a43d3c3f2ba44bceb519a0696e1ba441800 GIT binary patch literal 375 zcmV--0f_#IP)n`5knO{RcJoOVB!a5-&MFKSRK;In$zuXoa@aHD)h zf@VK%ST=rFCF{3-pn+J3ZcC(oM}}W4WJ@JsV)uan0065=L_t&-(`C+A5`!=dMbXH@ z-MB%3P}BSV*B6mr?&lfJ= zdsUum4#6X1C?EZJP^f8bSOa-|wF`=iC+qn|{rj V3gJ4$MZo|7002ovPDHLkV1iD9pBn%G literal 0 HcmV?d00001 diff --git a/textures/default_chest_top.png b/textures/default_chest_top.png new file mode 100644 index 0000000000000000000000000000000000000000..1fbdbb94c966b39145bb0f06d30619afb5ba81f8 GIT binary patch literal 418 zcmV;T0bTxyP)nsh*fXFYILEX|{8#G7NJgI1=1NtAU-k#a-k;In$zuXoa@aJiCM zwU1VxfK#S~QIT*zdtp40Y&wEtIDB0)iDE8wS1oK%C}&9`>$iThkYbm5Q>TGSifA}x zPAvL-GKl~H0J}*T^13?f3z@BBeJ!TX$7^M7Dv;V5Xr&G90(|D|=Fb>@h zfFN=yBb)iwm}C#&LacSpY}TvQmm2^avRwQ|ob#T9z5_UlSeIf}MX9v90yq~+D|MT7 zPn1^xI%m?YrASJ-lNEqh*=LNUX_C0j`WryWInQk-nNJh52Qcm;62xsJ8QUHJ1ke6? z-W8!j^kMAf)4=R*X8+q)c0kn>r;gfe_Q+w!YS1S)Bpeg M07*qoM6N<$f@c=8ZU6uP literal 0 HcmV?d00001