From 192eabd7095d7939f577e819f1640802747b4e21 Mon Sep 17 00:00:00 2001 From: jp Date: Sun, 16 Aug 2015 13:24:57 +0200 Subject: [PATCH] Add new doors --- crafts.lua | 42 +++++++++++++++++++++-- nodes.lua | 28 +++++++++++---- textures/xdecor_brownb.png | Bin 0 -> 109 bytes textures/xdecor_brownc.png | Bin 0 -> 109 bytes textures/xdecor_grey.png | Bin 0 -> 82 bytes textures/xdecor_prison_door_a.png | Bin 0 -> 252 bytes textures/xdecor_prison_door_b.png | Bin 0 -> 255 bytes textures/xdecor_prison_door_inv.png | Bin 0 -> 242 bytes textures/xdecor_prison_rust_door_a.png | Bin 0 -> 251 bytes textures/xdecor_prison_rust_door_b.png | Bin 0 -> 250 bytes textures/xdecor_prison_rust_door_inv.png | Bin 0 -> 236 bytes textures/xdecor_rust.png | Bin 0 -> 82 bytes textures/xdecor_screen_door_a.png | Bin 0 -> 277 bytes textures/xdecor_screen_door_b.png | Bin 0 -> 285 bytes textures/xdecor_screen_door_inv.png | Bin 0 -> 257 bytes textures/xdecor_slide_door_a.png | Bin 0 -> 215 bytes textures/xdecor_slide_door_b.png | Bin 0 -> 237 bytes textures/xdecor_slide_door_inv.png | Bin 0 -> 212 bytes 18 files changed, 60 insertions(+), 10 deletions(-) create mode 100644 textures/xdecor_brownb.png create mode 100644 textures/xdecor_brownc.png create mode 100644 textures/xdecor_grey.png create mode 100644 textures/xdecor_prison_door_a.png create mode 100644 textures/xdecor_prison_door_b.png create mode 100644 textures/xdecor_prison_door_inv.png create mode 100644 textures/xdecor_prison_rust_door_a.png create mode 100644 textures/xdecor_prison_rust_door_b.png create mode 100644 textures/xdecor_prison_rust_door_inv.png create mode 100644 textures/xdecor_rust.png create mode 100644 textures/xdecor_screen_door_a.png create mode 100644 textures/xdecor_screen_door_b.png create mode 100644 textures/xdecor_screen_door_inv.png create mode 100644 textures/xdecor_slide_door_a.png create mode 100644 textures/xdecor_slide_door_b.png create mode 100644 textures/xdecor_slide_door_inv.png diff --git a/crafts.lua b/crafts.lua index fe9438b..cef8f70 100644 --- a/crafts.lua +++ b/crafts.lua @@ -199,9 +199,9 @@ minetest.register_craft({ minetest.register_craft({ output = "xdecor:japanese_door", recipe = { - {"group:wood", "group:wood"}, - {"default:paper", "default:paper"}, - {"group:wood", "group:wood"} + {"group:wood", "default:paper"}, + {"default:paper", "group:wood"}, + {"group:wood", "default:paper"} } }) @@ -273,6 +273,24 @@ minetest.register_craft({ } }) +minetest.register_craft({ + output = "xdecor:prison_door", + recipe = { + {"xpanes:bar", "xpanes:bar"}, + {"xpanes:bar", "xpanes:bar"}, + {"xpanes:bar", "xpanes:bar"} + } +}) + +minetest.register_craft({ + output = "xdecor:prison_rust_door", + recipe = { + {"xpanes:rust_bar", "xpanes:rust_bar"}, + {"xpanes:rust_bar", "xpanes:rust_bar"}, + {"xpanes:rust_bar", "xpanes:rust_bar"} + } +}) + minetest.register_craft({ output = "xdecor:rope", recipe = { @@ -281,6 +299,24 @@ minetest.register_craft({ {"farming:string"} } }) + +minetest.register_craft({ + output = "xdecor:screen_door", + recipe = { + {"group:wood", "group:wood"}, + {"xpanes:chainlink", "xpanes:chainlink"}, + {"group:wood", "group:wood"} + } +}) + +minetest.register_craft({ + output = "xdecor:slide_door", + recipe = { + {"default:paper", "default:paper"}, + {"default:paper", "default:paper"}, + {"group:wood", "group:wood"} + } +}) minetest.register_craft({ output = "xdecor:stereo", diff --git a/nodes.lua b/nodes.lua index 892a9e4..25cadb7 100644 --- a/nodes.lua +++ b/nodes.lua @@ -257,16 +257,30 @@ xdecor.register("cushion", { node_box = xdecor.nodebox.slab_y(-0.5, 0.5) }) -local door_types = {"woodglass", "japanese"} +local function door_access(door) + if door:find("prison") then return true end + return false +end + +local door_types = { + {"japanese", "brown"}, + {"prison", "grey"}, + {"prison_rust", "rust"}, + {"screen", "brownb"}, + {"slide", "brownc"}, + {"woodglass", "brown"} +} for _, d in pairs(door_types) do - doors.register_door("xdecor:"..d.."_door", { - description = d:gsub("%l", string.upper, 1).." Door", - inventory_image = "xdecor_"..d.."_door_inv.png", + doors.register_door("xdecor:"..d[1].."_door", { + description = d[1]:gsub("%l", string.upper, 1).." Door", + inventory_image = "xdecor_"..d[1].."_door_inv.png", groups = {choppy=3, flammable=2, door=1}, - tiles_bottom = {"xdecor_"..d.."_door_b.png", "xdecor_brown.png"}, - tiles_top = {"xdecor_"..d.."_door_a.png", "xdecor_brown.png"}, - sounds = xdecor.wood + tiles_bottom = {"xdecor_"..d[1].."_door_b.png", "xdecor_"..d[2]..".png"}, + tiles_top = {"xdecor_"..d[1].."_door_a.png", "xdecor_"..d[2]..".png"}, + only_placer_can_open = door_access(d[1]), + sounds = xdecor.wood, + sunlight = false }) end diff --git a/textures/xdecor_brownb.png b/textures/xdecor_brownb.png new file mode 100644 index 0000000000000000000000000000000000000000..298e28dca2c6521950a4474cb9c4674a6440dff9 GIT binary patch literal 109 zcmeAS@N?(olHy`uVBq!ia0vp^j3CUx1SBVv2j2ryoCO|{#S9GG!XV7ZFl&wkP>{XE z)7O>#K8FC8zWUb?fh#~E9#0p?5RU7~C-{q)8JMgYIUcQFnG6(X@O1TaS?83{1ON|H B7OVgO literal 0 HcmV?d00001 diff --git a/textures/xdecor_brownc.png b/textures/xdecor_brownc.png new file mode 100644 index 0000000000000000000000000000000000000000..4d0a2f0cce592c4d7935c6091000dbe58159e621 GIT binary patch literal 109 zcmeAS@N?(olHy`uVBq!ia0vp^j3CUx1SBVv2j2ryoCO|{#S9GG!XV7ZFl&wkP>{XE z)7O>#K8FC8k>S5LCuahMcsyMkLpZJ{a~K9QF);QqtYx$Ne+wwi;OXk;vd$@?2>>zE B7mxq| literal 0 HcmV?d00001 diff --git a/textures/xdecor_grey.png b/textures/xdecor_grey.png new file mode 100644 index 0000000000000000000000000000000000000000..db7d1c39c13dfb5c6cc136a26b47e2ad3af1fd17 GIT binary patch literal 82 zcmeAS@N?(olHy`uVBq!ia0vp^j3CU&3?x-=hn)ga%mF?juB%q960H0E6UgQAba4#f cxSpHz-fpg=3Ovrq*ZiLE-F5x{|JPy#u9i-gD!O6ICx7I; zmsz#_Ag?4N@9IS7fGIzg)(4ce3bAn)1-m{LSnH)TUm>g2o8_nX2iHfjuf(`jtSmSm w?FmtQbfIwNB(;khx2qXi@Yb%LtnrQE&}nAduv<;Pfi^REy85}Sb4q9e0Mb-kK>z>% literal 0 HcmV?d00001 diff --git a/textures/xdecor_prison_door_b.png b/textures/xdecor_prison_door_b.png new file mode 100644 index 0000000000000000000000000000000000000000..c013573911f4c8dc007b4e46e74d49bb76351095 GIT binary patch literal 255 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GbL!O@L2`E08WKDw;fb@`42m>g($R z0|T9$oOE<_HgDdXo0}USAD@w)Zen86($Z2{S(%lUoe#MBM-jwZ~h^QJ{k ytGhlexXQ0TqqE;-ulgi`r?z_D?B$YK-}(3RGV25+$9@4?&fw|l=d#Wzp$PyhCtVl- literal 0 HcmV?d00001 diff --git a/textures/xdecor_prison_door_inv.png b/textures/xdecor_prison_door_inv.png new file mode 100644 index 0000000000000000000000000000000000000000..1828c2461b9d3a12edc123968bfff1ff3a664581 GIT binary patch literal 242 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GbL!O@L2`E08WOF3!rznml>(zJ2?Q zjg1#9Sdf{K5gQv@Uthm@^XAp7SGTsdIygAoyLa#K;lmp?Y*@BzS$B7LQc_Z8U;ZYb ze#Vj@zhDN3XE)M-oD@$N#}J9jseRFW2NXD197R@degFIZR*$J>W#8L<)EKU$q$N#q z;I_VUgwN=Z%GV4wrzyXdGCQsKda#G>LXTj}2ZrARS{~covmO1;%Z0NSNB{bt mY;sRF@L<}3g&{^KYnVBoF@93)H(vv^kHOQ`&t;ucLK6TobzC9< literal 0 HcmV?d00001 diff --git a/textures/xdecor_prison_rust_door_a.png b/textures/xdecor_prison_rust_door_a.png new file mode 100644 index 0000000000000000000000000000000000000000..d88ef1601e7417b4829b88d68aa250151d173158 GIT binary patch literal 251 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GbL!S%6Q7E0B)W)ol*2&M`Kgl;R*P zBow5nxuPXDTt~-EO-)ToD%HTiTtUG|UVh_*y!jQrh32LnYHH6X^Iiw)WGo5t3ubV5 zb|VeQDfV=643W6(+siG)q{!oZIl@lw(Yo*Z*Zj38o#}qEg~ecs*EO{ps$xmsI7Mv& z3z9gjxV|3o?qex>!M3(np1)>RXwb8qv=$eiT?>=M9YbR-87{mnJoEeorloN#g>e#f t*WBNq)-Ey@E6e`$|L2?t+g_LF;@Ml7rW)yIKLA?K;OXk;vd$@?2>>qnQJw$* literal 0 HcmV?d00001 diff --git a/textures/xdecor_prison_rust_door_b.png b/textures/xdecor_prison_rust_door_b.png new file mode 100644 index 0000000000000000000000000000000000000000..a70028b533ee098a462e1106ef5ddc99e022f068 GIT binary patch literal 250 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GbL!aez;VE0B)W)ol*2&M`Kgl2d;DX6wOm7@cuB%TN#0Vq%AkT%xfgU#M!Q&WEepGlk)8Va@06O<%EdoD sV%Q(@#=1Rny}#4w(_t>NUq`+$wQgd1xUyT>2Iv3=Pgg&ebxsLQ0NH#}w*UYD literal 0 HcmV?d00001 diff --git a/textures/xdecor_prison_rust_door_inv.png b/textures/xdecor_prison_rust_door_inv.png new file mode 100644 index 0000000000000000000000000000000000000000..e2431f1551e8ba59de4b95db9f6f30347356a706 GIT binary patch literal 236 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GbL!Wq?nJE0B)U(+k$pY7Vg8GPOiS zMP*W|gR81)uCeiome_gaJ|$LWM!LFpuAJUAuf8cgX-R$9%seM=b#=|N8}0%%GnNGT z1v5B2yO9RuBzn3yhDcma?Yqs#Ajrd7y)dHs|Ns8Gn@kSP6rbrM6)?>uB7!~FDZ)Kg zrDcJ|7N$m#?d1nKSf8)WU|Kt)_4|GW;p0=2`wDfMilPs)v_5~El;&W#a)+K f7B1rc^^f6gC*wYgb+YY1%NRUe{an^LB{Ts5UJO#* literal 0 HcmV?d00001 diff --git a/textures/xdecor_rust.png b/textures/xdecor_rust.png new file mode 100644 index 0000000000000000000000000000000000000000..36f4a4b9d83d01cf44df59dec55a6daee5a597dc GIT binary patch literal 82 zcmeAS@N?(olHy`uVBq!ia0vp^j3CU&3?x-=hn)ga%mF?juFV0~{yTMwfm|+67sn8e b>&Xc~HWLHmBgH+&Ko*0itDnm{r-UW|RB;fd literal 0 HcmV?d00001 diff --git a/textures/xdecor_screen_door_a.png b/textures/xdecor_screen_door_a.png new file mode 100644 index 0000000000000000000000000000000000000000..20a08e3ff808d0e844bed3130bd9037661d9272f GIT binary patch literal 277 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GbL!Q-Dv1E09i#j?6**ROT>kv!-tYhMv8m_IESqQ+B5?9b zh`MOi(f!4#5iJ6Z57tU*mbqH3DgRJ6F}wUto7>A-B2`-rnwq~defM50SU0QY*7x4j zlqGg{sikj&^X@0VN>E?kGEq?JZO;a~V{x0__EeaDyYDxJYi3l?vE5Ve+5Z2;c;^yx VNrdL5zd*+@c)I$ztaD0e0st;SXo>&; literal 0 HcmV?d00001 diff --git a/textures/xdecor_screen_door_b.png b/textures/xdecor_screen_door_b.png new file mode 100644 index 0000000000000000000000000000000000000000..a9d3d4810136677f17475e95f76935bff410c42d GIT binary patch literal 285 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GbL!Uw}`DE08V-a+{D9ZD(aMw>UW| zI-)r-xFW)5ePe!>pR=y6ZhLKIWkGIZd=L;sg#^aATAP@dcv~1~X=>W(s&8*ESy_`k zzceK$C2?|2?9p@YcLGghED7=pW^j0RBMr!@^>lFzk+|&Z$H~;Jz{922lswdHDdgr6*6H(vD+%Ats_1D+u-Dg%gFq6Hw|CzCa^Xu=zuY|tU zt*O5L;tc1j?$;u1%) b_&4*$u4GBk3oSSZbO?i|tDnm{r-UW|7G7tO literal 0 HcmV?d00001 diff --git a/textures/xdecor_screen_door_inv.png b/textures/xdecor_screen_door_inv.png new file mode 100644 index 0000000000000000000000000000000000000000..94cbd8cc564a611f97caceae1d1b4d59d86f4b39 GIT binary patch literal 257 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GbL!eSlAhE08V>cF*u}+SOTRYiThd zD|%f+?%d+!oRq|*=!n`Fe-jgv71deIiNOvI4lyoP`+F-FSEP5Oga!Ef>+0$%$vs>M zG=i}t$S;_|;n|HeAg937#W6(UvTt9cSc?J=i#4~w0gLXc|C?tm(3!ga%j)Z#b7lm2 z96aEhlvTj5l&TSuA<;6ux28(KBR70y1aIqwER9b*T8g_3*U3EJH+Ail%q^E>+68w^ z{kPw?;(q_y`hvu?m6tpEbYvg>aXXNbT=9}MfRky)!YOw?1MOz;boFyt=akR{0H8)( AO#lD@ literal 0 HcmV?d00001 diff --git a/textures/xdecor_slide_door_a.png b/textures/xdecor_slide_door_a.png new file mode 100644 index 0000000000000000000000000000000000000000..bf92afeeb23024f913f8356540194766d5c6e66d GIT binary patch literal 215 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!73?$#)eFPHF4e$wZee(42-FvssoIM$0rc@JR zcJkD*SUW9i4RHenf$~6OA4A!r#}4KD80yOK$2)2%{wtpg)R^k&;uyklJ=x-skuXQB zjpV7@)>Zja!ejxTiFG z8yZI#b1*0dOcxAb(<$Ou!?r?OI%$E-;h+hP3M*A+taBA$-pTO%2;WPumK;lyxLCA3nN&_ulOgGbJBG z*)wNPW_#+#+G!;@Yo0iH)J0d?T1`COQ7b(?-N(nr)zwu~Q}gJe%3VP1rJgR1ArhBu zd%O9LDsVWTb`ZQ<`{)1lzPvuE$&+tIRs8rKO!$upr%Yv`ygWvwQD{KOG|fBz*e(a(Vz7)yfuf*Bm1-ADs+LOop^ zLpZJ{CnQ9~#f9!`VC3kTqNgd@AmQ7$sEJqMnA$;y>zoS56x|&UvTTr==pbmItQm0O zBEuO09uZ51B%dlJjU9|@{wjs+p15GK!bLVIW=AGwhP)n$*V_*)dI7Y6!PC{xWt~$( F698vPMa=*J literal 0 HcmV?d00001