From a0417d3ad323a99a67773909b14556dd22a8f584 Mon Sep 17 00:00:00 2001 From: Kotolegokot Date: Wed, 1 Aug 2012 21:27:50 +0600 Subject: [PATCH 1/2] Mesecon Torch --- .../textures/jeija_torches_off.png | Bin 214 -> 219 bytes .../textures/jeija_torches_off_ceiling.png | Bin 216 -> 220 bytes .../textures/jeija_torches_off_side.png | Bin 202 -> 206 bytes mesecons_textures/textures/jeija_torches_on.png | Bin 207 -> 210 bytes .../textures/jeija_torches_on_ceiling.png | Bin 217 -> 220 bytes .../textures/jeija_torches_on_side.png | Bin 193 -> 197 bytes mesecons_torch/init.lua | 16 ++++++++++++++-- 7 files changed, 14 insertions(+), 2 deletions(-) diff --git a/mesecons_textures/textures/jeija_torches_off.png b/mesecons_textures/textures/jeija_torches_off.png index fe01bfba729a16c1069db77251b0015f4fe9d304..537920c268e09709a0d69ff636fc92144d9e81b8 100644 GIT binary patch delta 171 zcmcb{c$?9j+cB5*A~YC9;#`C03rFX!Vq>j8U<~ TVwP?R&|(HpS3j3^P6FdgVhlQVsk?BK}OX9?6xumIG#n&Q={1Uj{PJi&X zt@?@Fhv&>6fBU_@H!D?s#VrMy=h{ai8M2yAuqJ5yK495UwfKF+yM$=*FwZ&5H^wM2 oc=W7bYFNX(q^I!@%SKLqsSS!HUo@Vi0WD+jboFyt=akR{0Cd|zApigX diff --git a/mesecons_textures/textures/jeija_torches_off_ceiling.png b/mesecons_textures/textures/jeija_torches_off_ceiling.png index f143b01ae2ae56e52f369da0e94b0a02ef52e49d..3934e6e9983a56ebcdd9b3ff3ab3ae581ffe24d5 100644 GIT binary patch delta 199 zcmcb?c!$xrGr-TCmrII^fq{Y7)59eQNDBh700$e8{9rgG9!RkzdAqwX{0G4WdzVk1 zs3%{~!N|`lxAwplZ=iIhr;B5V#p$;b4)Qh_@G#FcxlqP@?E#}T<7bD&pkI!O&1@IN zg}!g|+s4>@&Ur0QbmKC`5brr}H>mn=cwP~&|FZq!6cO>|xmV}-w+I-X<=&g+q@y4f v6IB=96@7EzS3#wq?=`phkDhPe$#}z<_vK&p6;%w}Kx;i+{an^LB{Ts5@tH_U literal 216 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|I14-?iy0Vr z{1_Oxg&9kAckTxYvX^-Jy0YJ4;b&qLd(|*O1}K!}>Eak-ar*6qgMtkTJS_YiY*rh1 zR&YV)bWE{99sJ6ck z@$UNAP%QV@Wc6{*DQX(N7L)g=q@KOCAdz3GYJb6vZ!Por3mD&(^1eJSZ@Lv|D}$%2 KpUXO@geCxsD@D@) diff --git a/mesecons_textures/textures/jeija_torches_off_side.png b/mesecons_textures/textures/jeija_torches_off_side.png index 8d20e5607e4743d3c25b9b8cd89b391389f73dab..ecb29511a69b2c13e49f689745a936302be8fb36 100644 GIT binary patch delta 163 zcmX@bc#d&`xQrkN8v_HwmGwGDfD~Jjx4R3&e-K=-clqRrdh#_KjQp%(i=|^Kfzr{Q zE{-7ef*_U$9dA+nES$93_O?{gs7V2uBJzG?O P)-ZUw`njxgN@xNAHC8{{ delta 187 zcmX@dc#3g?c)b7z8v_G_{OA9PK#H+A$lZxy-8q?;Kn`btM`SSr1Gg{(1CJjg*MXHS zKtc8rPhVH|J1qQ6jB-z+CG>zoF`h1tAr`0Ko^#}KaA0VCSbr!`Q{70)vTg0!l!qos zX|tZQOqn_<|M#n}hu_ye%PWapFJR-Uc50PbKcCcX6ECA5$K`D mrN7~tr{<*RF=Bu09Eak-ar*6qi<}Jx0?y7aL--zU-)z}#yklbS%JNR>kPi+5 zXYvmz+dMem?p%I1_mY4^mypLR!y|VuW;L4FO?F@Ul`GOY-%dP04Uc%_y7O^ literal 207 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|I14-?iy0Vr z{1_Oxg&9kAckTxYvX^-Jy0YJ4;b&qLEP28T5=!)RaSX9I{dU4d&ISVk=jIZv_7Asj z&N(c3=ft)vyN__@EIi78@K4-3LAejlnHTQP`o8j)PnVF#D((mGPG~w+$q8mLXmf7r znZzz5^Lv?M=WCmdKI;Vst07_Ry A00000 diff --git a/mesecons_textures/textures/jeija_torches_on_ceiling.png b/mesecons_textures/textures/jeija_torches_on_ceiling.png index efe04004b58c1f6e58621c6efe4040b942bb0151..24fe20166165679b59aa53ba1fe6d9dcc5064128 100644 GIT binary patch delta 199 zcmcb~c!$xrGr-TCmrII^fq{Y7)59eQNDBh700$e8{9rgG9!RkzdAqwX{0G4WdzVk1 zs3%{~!N||b5h;==1(eS8ba4!^IQ_Q&AZLSt0E>CH(k#6-hlFx2Sgko&^@n30ljplP z2O7Q$&3Vtq%xx0!%rlxVx{06h8OQE>awnC(osdvI^XB%dWez7j*MGh+Y4X1Pk8NJC vANZO6Hd91URB!@|=l5ShYePSNPRt9Bkn6cG>wc7h8)&VktDnm{r-UW|`35=^%uT7AWJz4Nw<7ekRwbJwF5(Kt#9MXFC`p7o<2|5weSuV3({uaMr)qK{= a0&(gO4Q*eXj%WtzXYh3Ob6Mw<&;$UxcQ1PY delta 147 zcmX@gc#v^|xU&EU8v_G_{OA9PK#H+A$lZxy-8q?;Kn`btM`SSr1Gg{(1CJjg*MXHS zKtc8rPhVH|J1qQ6jO+~t8{Pqhf+xl+xo+WjdbRu#dt1M< Date: Wed, 1 Aug 2012 23:28:02 +0600 Subject: [PATCH 2/2] Meselamp nodebox --- mesecons_lamp/init.lua | 48 +++++++++++------- mesecons_textures/textures/jeija_meselamp.png | Bin 0 -> 260 bytes .../textures/jeija_meselamp_off.png | Bin 209 -> 253 bytes .../textures/jeija_meselamp_on.png | Bin 200 -> 307 bytes .../jeija_meselamp_on_ceiling_off.png | Bin 196 -> 0 bytes .../textures/jeija_meselamp_on_ceiling_on.png | Bin 205 -> 0 bytes .../textures/jeija_meselamp_on_floor_off.png | Bin 194 -> 0 bytes .../textures/jeija_meselamp_on_floor_on.png | Bin 208 -> 0 bytes 8 files changed, 31 insertions(+), 17 deletions(-) create mode 100644 mesecons_textures/textures/jeija_meselamp.png delete mode 100644 mesecons_textures/textures/jeija_meselamp_on_ceiling_off.png delete mode 100644 mesecons_textures/textures/jeija_meselamp_on_ceiling_on.png delete mode 100644 mesecons_textures/textures/jeija_meselamp_on_floor_off.png delete mode 100644 mesecons_textures/textures/jeija_meselamp_on_floor_on.png diff --git a/mesecons_lamp/init.lua b/mesecons_lamp/init.lua index fcceeed..1ece13a 100644 --- a/mesecons_lamp/init.lua +++ b/mesecons_lamp/init.lua @@ -1,35 +1,49 @@ -- MESELAMPS minetest.register_node("mesecons_lamp:lamp_on", { - drawtype = "torchlike", - tile_images = {"jeija_meselamp_on_ceiling_on.png", "jeija_meselamp_on_floor_on.png", "jeija_meselamp_on.png"}, - inventory_image = "jeija_meselamp_on_floor_on.png", + drawtype = "nodebox", + tile_images = {"jeija_meselamp_on.png"}, paramtype = "light", + paramtype2 = "wallmounted", + legacy_wallmounted = true, sunlight_propagates = true, walkable = false, - legacy_wallmounted = true, - paramtype2 = "wallmounted", light_source = LIGHT_MAX, + node_box = { + type = "wallmounted", + wall_top = {-0.3125,0.375,-0.3125,0.3125,0.5,0.3125}, + wall_bottom = {-0.3125,-0.5,-0.3125,0.3125,-0.375,0.3125}, + wall_side = {-0.375,-0.3125,-0.3125,-0.5,0.3125,0.3125}, + }, selection_box = { - --type = "wallmounted", - --type = "fixed", - fixed = {-0.38, -0.5, -0.1, 0.38, -0.2, 0.1}, + type = "wallmounted", + wall_top = {-0.3125,0.375,-0.3125,0.3125,0.5,0.3125}, + wall_bottom = {-0.3125,-0.5,-0.3125,0.3125,-0.375,0.3125}, + wall_side = {-0.375,-0.3125,-0.3125,-0.5,0.3125,0.3125}, }, groups = {dig_immediate=3,not_in_creative_inventory=1}, drop='"mesecons_lamp:lamp_off" 1', }) minetest.register_node("mesecons_lamp:lamp_off", { - drawtype = "torchlike", - tile_images = {"jeija_meselamp_on_ceiling_off.png", "jeija_meselamp_on_floor_off.png", "jeija_meselamp_off.png"}, - inventory_image = "jeija_meselamp_on_floor_off.png", - wield_image = "jeija_meselamp_on_ceiling_off.png", + drawtype = "nodebox", + tile_images = {"jeija_meselamp_off.png"}, + inventory_image = "jeija_meselamp.png", + wield_image = "jeija_meselamp.png", paramtype = "light", + paramtype2 = "wallmounted", sunlight_propagates = true, walkable = false, - wall_mounted = false, + node_box = { + type = "wallmounted", + wall_top = {-0.3125,0.375,-0.3125,0.3125,0.5,0.3125}, + wall_bottom = {-0.3125,-0.5,-0.3125,0.3125,-0.375,0.3125}, + wall_side = {-0.375,-0.3125,-0.3125,-0.5,0.3125,0.3125}, + }, selection_box = { - --type = "fixed", - fixed = {-0.38, -0.5, -0.1, 0.38, -0.2, 0.1}, + type = "wallmounted", + wall_top = {-0.3125,0.375,-0.3125,0.3125,0.5,0.3125}, + wall_bottom = {-0.3125,-0.5,-0.3125,0.3125,-0.375,0.3125}, + wall_side = {-0.375,-0.3125,-0.3125,-0.5,0.3125,0.3125}, }, groups = {dig_immediate=3}, description="Meselamp", @@ -46,14 +60,14 @@ minetest.register_craft({ mesecon:register_on_signal_on(function(pos, node) if node.name == "mesecons_lamp:lamp_off" then - minetest.env:add_node(pos, {name="mesecons_lamp:lamp_on"}) + minetest.env:add_node(pos, {name="mesecons_lamp:lamp_on", param2 = node.param2}) nodeupdate(pos) end end) mesecon:register_on_signal_off(function(pos, node) if node.name == "mesecons_lamp:lamp_on" then - minetest.env:add_node(pos, {name="mesecons_lamp:lamp_off"}) + minetest.env:add_node(pos, {name="mesecons_lamp:lamp_off", param2 = node.param2}) nodeupdate(pos) end end) \ No newline at end of file diff --git a/mesecons_textures/textures/jeija_meselamp.png b/mesecons_textures/textures/jeija_meselamp.png new file mode 100644 index 0000000000000000000000000000000000000000..5456ee98aea05dec000fdce822a9665ec1f658be GIT binary patch literal 260 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkE)4%caKYZ?lYt_f1s;*b z3=G`DAk4@xYmNj^kiEpy*OmPa2cw{f*EC9V-A&iT2ysd*&~&PAz-C8;S2 z<(VZJ3hti10pX2&;y^_?o-U3d7N_4%-pG5{fQQAuk&Ex^&6h2cL4F4((#GEjuGz$3Dlfq`2Xgc%uT&5-~K zvX^-Jy0YKlU=-xn{pWspEl^0Z#5JPCIX^cyHLrxhxhOTUBsE2$JhLQ2!QIn0AiR-J z9H=PO)5S5w;`H0e)?5byI9RSHJX~n=FIDc;xe$Jz6X#W2yL^^z=s2Mf04Eg8D0BX7`=i feg8(FBtzPS873;Mf;|pE8yP%Z{an^LB{Ts5!?NMQuIzVM_!-sB(+l_71BH@3T^vI+&i7v2$lGAR<8o2HV}g>DmDM--hDoUoCO!-r zoM}ymV_v66S~X8zz&5qD)91=;>Fr-lq=u)R>VpkhIl!hhyX r?d>;(Jk2v@9xkb|%|5=P;4@R}2k}(ahneL-`xrc3{an^LB{Ts5$16f0 diff --git a/mesecons_textures/textures/jeija_meselamp_on.png b/mesecons_textures/textures/jeija_meselamp_on.png index 45cb35c882559ac8e5bb20f617063433149302e3..2316e00e670c03d4e02025549f0a77798577a3f9 100644 GIT binary patch delta 280 zcmX@XxS45!N9s+Qe9ZYt%OiL$EM(=Mwj{y)vOXV@6w&zao{lT+$q}} zxjx@myej(B98*U=jXe*zZt%`!a0uQ0N@3WVoKb?ICeKVmaKYQa+3*blLH=V+Zz{@}Z7B!2;OQb$4nuFf3k00009a7bBm000XU000b50SdsWga7~l2XskI zMF-pj4*@4O5O$5J00015NklmmCfQBTkIb!>+BoHou3ndH}cwFFify-Ose@OO} a=jR3RoEvQM9G(>b0000k44ofy`glX(f`a29w(7Bet# z3o|hA_%U)FSlI#;WH0gbb!ET9!q2E7;}aUO0Vova>EaloasKV8y}V5U3~m=cGYWZg zal04%50p9BCLqi${E4e>-d3N4hdbZ$mY=uUvE+K@TC?t>5#iVGn9Mm7cjbN8c4H~I qWg_lJrzqqo6-ktduHAqCBO}{++1fj7dQX5hFnGH9xvXv!soVEiwu~U z7aU-nbAa*9ksV4#R}Zgi*}D1RV*A_6GVOLT<|it;C!Y{^23p17>FVdQ&MBb@0Haby A*8l(j diff --git a/mesecons_textures/textures/jeija_meselamp_on_floor_off.png b/mesecons_textures/textures/jeija_meselamp_on_floor_off.png deleted file mode 100644 index d6c79432d001aa262139d213faa336a49b3d8e42..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 194 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!60wlNoGJgf67>k44ofy`glX(f`a29w(7Bet# z3o|hA_%U)FSlI#;WH0gbb!ET9!q2E-Qu*M67f>j~)5S4F%hoE|v@{p}QR(lwTxB4H}E_05LgKW7E^cLglk oyEa<2DkW^L&n~w45jhr&VY7tyb-DeP1)9&`>FVdQ&MBb@05+CFPyhe` diff --git a/mesecons_textures/textures/jeija_meselamp_on_floor_on.png b/mesecons_textures/textures/jeija_meselamp_on_floor_on.png deleted file mode 100644 index deae3db2f04484b4835bd478baad9723928c8e13..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 208 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|I14-?iy0WW zg&7!l{1~|otZV@avX^-Jy0YJ4;b+ujTcIEak-aXL9cf^~6%NC2yWQgPh= zykGiCO2-czP&fbtXMy-A5OaloYi?|O$b5LV`EyAZ*Vhkz%}D4eef{j8`n9l>tvUv5 x?8ocb%*+DW+>Wuh)y%T5oAYmeGjpOiL)Af1q0EDMUO?LzJYD@<);T3K0RZn>MWO%z