From e974179082a62258f8ace02e6140290689fc8b8d Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Wed, 15 Feb 2017 03:06:01 +0100 Subject: [PATCH] Add observer dummy block --- mods/redstone/mcl_observers/depends.txt | 2 + mods/redstone/mcl_observers/init.lua | 48 ++++++++++++++++++ .../textures/mcl_observers_observer_back.png | Bin 0 -> 1166 bytes .../mcl_observers_observer_back_lit.png | Bin 0 -> 1148 bytes .../textures/mcl_observers_observer_front.png | Bin 0 -> 1052 bytes .../textures/mcl_observers_observer_side.png | Bin 0 -> 1023 bytes .../textures/mcl_observers_observer_top.png | Bin 0 -> 996 bytes 7 files changed, 50 insertions(+) create mode 100644 mods/redstone/mcl_observers/depends.txt create mode 100644 mods/redstone/mcl_observers/init.lua create mode 100644 mods/redstone/mcl_observers/textures/mcl_observers_observer_back.png create mode 100644 mods/redstone/mcl_observers/textures/mcl_observers_observer_back_lit.png create mode 100644 mods/redstone/mcl_observers/textures/mcl_observers_observer_front.png create mode 100644 mods/redstone/mcl_observers/textures/mcl_observers_observer_side.png create mode 100644 mods/redstone/mcl_observers/textures/mcl_observers_observer_top.png diff --git a/mods/redstone/mcl_observers/depends.txt b/mods/redstone/mcl_observers/depends.txt new file mode 100644 index 000000000..95222145e --- /dev/null +++ b/mods/redstone/mcl_observers/depends.txt @@ -0,0 +1,2 @@ +mesecons +mcl_util diff --git a/mods/redstone/mcl_observers/init.lua b/mods/redstone/mcl_observers/init.lua new file mode 100644 index 000000000..250abfb03 --- /dev/null +++ b/mods/redstone/mcl_observers/init.lua @@ -0,0 +1,48 @@ +minetest.register_node("mcl_observers:observer", { + description = "Observer (WIP)", + is_ground_content = false, + sounds = mcl_sounds.node_sound_stone_defaults(), + paramtype2 = "facedir", + -- TODO: Add to craft guide and creative inventory when it's useful + groups = { cracky=2, not_in_craft_guide=1, not_in_creative_inventory=1 }, + tiles = { + "mcl_observers_observer_top.png", "default_furnace_bottom.png", + "mcl_observers_observer_side.png", "mcl_observers_observer_side.png", + "mcl_observers_observer_front.png", "mcl_observers_observer_back.png", + }, + after_dig_node = function(pos, oldnode, oldmetadata, digger) + local meta = minetest.get_meta(pos) + local meta2 = meta + meta:from_table(oldmetadata) + local inv = meta:get_inventory() + for i=1, inv:get_size("main") do + local stack = inv:get_stack("main", i) + if not stack:is_empty() then + local p = {x=pos.x+math.random(0, 10)/10-0.5, y=pos.y, z=pos.z+math.random(0, 10)/10-0.5} + minetest.add_item(p, stack) + end + end + meta:from_table(meta2:to_table()) + end, + -- TODO: Mesecons handling + mesecons = {effector = { + }} +}) + +minetest.register_craft({ + output = "mcl_observers:observer", + recipe = { + { "mcl_core:cobble", "mcl_core:cobble", "mcl_core:cobble" }, + { "mcl_nether:quartz", "mesecons:redstone", "mesecons:redstone" }, + { "mcl_core:cobble", "mcl_core:cobble", "mcl_core:cobble" }, + } +}) +minetest.register_craft({ + output = "mcl_observers:observer", + recipe = { + { "mcl_core:cobble", "mcl_core:cobble", "mcl_core:cobble" }, + { "mesecons:redstone", "mesecons:redstone", "mcl_nether:quartz" }, + { "mcl_core:cobble", "mcl_core:cobble", "mcl_core:cobble" }, + } +}) + diff --git a/mods/redstone/mcl_observers/textures/mcl_observers_observer_back.png b/mods/redstone/mcl_observers/textures/mcl_observers_observer_back.png new file mode 100644 index 0000000000000000000000000000000000000000..3723fec741e716161f69af29eeecf2df1f19e1f9 GIT binary patch literal 1166 zcmZ|GeNd7I9KiA4^QfVgT2kp*84`p_=;H$lf*?GC2nZtJOLyw>t<>f;Wx6y|W>bc5 zouPJ_i?iIVsZ8Tdi%GHeD~f%}jRvxj**D=dbU5Kh$dEUY-G- z0N|xakm>+{@`k$$07%bRMgYKdpF}MIxX`wCCEM*y%uUd#0jlT#b@c%MI05SB0N%v_ zp6mhO9|!O&X@6@t9srSO6Adypn;jMwhT}Ms$qWn(q*AFg8jZzbF>3R;yGh<#M?~ zp&$rCAP|T|qQt~RjYgB6o-UP2IUJ5!t*)!9tE{X{NlDS`^#uh5ot>R+ZEXgFAu}`6 zX0x@lwA9zvS5;M+Or~wywq;~wR99D1C=@Q2o1dSbmX;N5sbB7*e_FgK6me)-Ttzw=9}d66D<=*`gt1i>reFue!|@kEd~5d zIeOc4zdto|;=tAk3EH#9mGi`&)AU8u30r&9k@?Q`lRq9Qr4^L`Ry<@F4IYY%8i)UyJ$V|gmOWsyfNH(z*|KVmHzH=aC-dHUhIZm1`yI2`;xMbj+ zE)wB8ww&#U++8=h?01yfYdu(t4AqQZBU_&b`$})rHTo}Jxcc+!+10BL8c*l0^!B7L zjWUvhAFeh(?m6i_KGvT1Ue!XjNwZ!-_c)fdzEO--;4y;O?Jey=JB@-1et&f&xxTov zd=kYH#;*TzBhR|dzc0o&i$;q&Yt7rRsIy!drbF6e67EZcQt7wm++zN?bMDb{8GiYa zLR9haNxX+d0TpV7=T3JJ#?^_KGy`2L9bfYZY zn3rwL=jWE?XB+bY$0E2a3};0|8ZeyC#`qjI6N}(uSdQxZ-2V*4C3%H=5B~o^-duPe O06-zrNC${L@Ba%DBeQ}4 literal 0 HcmV?d00001 diff --git a/mods/redstone/mcl_observers/textures/mcl_observers_observer_back_lit.png b/mods/redstone/mcl_observers/textures/mcl_observers_observer_back_lit.png new file mode 100644 index 0000000000000000000000000000000000000000..b467cfe7c1c769325ab64bcfae431700443a8447 GIT binary patch literal 1148 zcmZ|GZBWw%9KiA4MuLbyNFq8Ja}5#3VC?yM|2?toKQGbI6Xc~=1CX?}aJdsEwkw_E@B|JP_uh*j}s#Ge~YPD1< z<@5O>ktjYsUZ>L;jYhd#&R{UKTCLq~FDNM3xpQYyQc_M%PJMm7)9ExA3~6a;E|;sS zs;aE4%x1GW9FCBXkkr)FW59sF^0i*dcZ6Os}%}QVc|Ul(Fz251Yt86 zY$h|F&u_JtXt>-T8ygZtA{m2$a=G-_SPGdO9Ti23iE+E#HO^@x0AS1-r93-oY%&Z0 zybr5V@&J4S-@riASHS?_WmRhxUXQW1NQz`6Cj_GIoT@=o~|NJTkI zb=I^0UJ$9fVgQ-S?$V5&o#?(FVN7Z3O@HX#DDb+zx!B9yn8jKtS@}AT)^(y>T6u1H(U0JG((XK_b*+j?CJ0CQOrfnDh}f6x}sJr!)VRwF!}uacgD!iHNTrX z6I;KZeDGj;x?|VU2jlz43pGETni(63;fGC7N(a3<%KfoV*S}uOoy-rpaU_Ivr&WTq z@4m@a&A9v`FRLye#5jgzYn9C}{orn|&zcpxu`%A$Hk{o@c~;ytd7J%Z+{0e2Ir!p% z23#l-(Xe6r)on>thDghAO_z2J+%;7ex!zrR-SS7lFZ=t72&BgsaJ>OYyZuZFCW44I zE^RtIwI~osxK5&^Zhhe=3;1V?!^1Jr9mBSX*NQ!zzkZg`tiSqT<4Ax1bAQhvll#@w z5VoCAgKpUV1HsRcF?UWJTy=fM6dE|ye$Qv%=WwhoBTa{S;u}|c)5^oY3O*~?kWM18 zTI;d`4kc9#&iUE7e>o~oR9C3H^K2OB9;+xg;l=i@Yx9|8Kf#W{9bk}tOsy>3`pAQN z8Z+;`deKKj3g{VYT1LIMiI%)(7R<39HORVOCSM_<5$(*k(c>x3<@rVYhoMI!=7_Ex z<5ym^J?y*DcI)JyH_nHL{&Ob1xyQ5GF0Cx?IK6d1e8;nu=~~<}vKw6vbnLA|pE%BR z$3b-%`Zs2mvYuR8>s~VF#~k-qI@&^y63_MnK$ulwv}T#C7G7qq#bmVrjT+0QP-&D{ vrh!W1(WyKJolK48QK@FlNalZr1BbHqWf%Sb5E!)Y5deT%p_6|r%_#jBbDOYU literal 0 HcmV?d00001 diff --git a/mods/redstone/mcl_observers/textures/mcl_observers_observer_front.png b/mods/redstone/mcl_observers/textures/mcl_observers_observer_front.png new file mode 100644 index 0000000000000000000000000000000000000000..1cd35918593741179f5f0d3cf1777e944fe9fc6b GIT binary patch literal 1052 zcmeAS@N?(olHy`uVBq!ia0y~yU{C;I4rT@h2A3sW#~2tGSkfJR9T^xl_H+M9WCckk zdj$D1FjT2BFf=qXF#P<_z|io5fgy;4fl)Mqfx&7z1A}<}^(grX3=E8d0X`wF#>U2a zdU{4iM%voia&mG?N=hm!D!RJ5>gwtN0RdiKUheMho}QjgPEOX=)^>JwK0ZEvetr=V z5iTw+CMG7nzP=3&4dvzKp`oF{!ND0B8Plds>+kOm2?>dfja{%{L2qwwb8~Z5RaIkS zqpYlKOiWC5b+v+mg1NbQYHDhDc(|>tt%Ze!w6wI5zP`MyoRWf~vZA80qLQM#yqt`z zqP&8vw2Y&zoxQb;_2(k{*Z~ENlx2C%-Df}f$_7ai(`nz>9vzzm(6kzXmHmvY-P#L>JrTrS|bs? z`sy-KUcm_!2hCU}M%4Zne|cun#NgY1UX}B`K6mE%CT<>v6eG#L!;Ruclv~)9PJdoh zG3RLHv#Bbcn@Wm`s<^!RD(2cdf10#p&q;3^k#qM~9W7V&)y{qzv@&Srp8Y#^?Adea z>*`hOUf*GFC=Oj4xOYufTcFd1zO7oZDk-UJuAfRh91wan;N$`?QSlY8raH;Kx^B88 zV?v^YtB@3L%$%N6?jkO(nqpJ4C!|CkvwdEaKIzNKn>k{$eAg||P%4mFX8G}jvC;$0 zk1Zu03-vgfJU)m0_FjHFcl+)5iDnn?UV3?_=J&m(c{ktl=AAX!&e_~pYQE*5oYl76 zUB5TI{uVp^Ut;vM$1@Uo_oTn${FTbs+QnC}Q!>*kacdA3%e>FP Pz`)??>gTe~DWM4fR2-VW literal 0 HcmV?d00001 diff --git a/mods/redstone/mcl_observers/textures/mcl_observers_observer_side.png b/mods/redstone/mcl_observers/textures/mcl_observers_observer_side.png new file mode 100644 index 0000000000000000000000000000000000000000..fba7cf70445ffdd0b1958f24c03b8fa400da750f GIT binary patch literal 1023 zcmeAS@N?(olHy`uVBq!ia0y~yU{C;I4rT@h2A3sW#~2tGSkfJR9T^xl_H+M9WCckk zdj$D1FjT2BFf=qXF#P<_z|ioLfuYoZf#FpG1B2BJ1_tr`N%2SB7#JAd2Ka=y8XFty z>FF668EI>4%gM^+1--q!&CShKRaK3R zjk2<`F)=aK)zu0L3g+hKsi~>q;o-KnwiXr^($dmK`ug&+a!Lw{%8H80ib{&|@^Uh= zit-Aw(lU;=cJ|gb4mP%~PEKx4&bF3TPWBGg<`#BV);1QFPImTI=H@PrPR#Arn87oVJIUu>%7G<1bGa#}JFtZztE5&oU5cS9ZF) z;pnZK4{IW$=iJEiTmE`lOWPhtu3PVZ*U!DnJug>2>AYouQ=Na_yT8m%9?LI(w5cfl z`+(<#(30zK*$&Q@TVs`f*x*h3^XKB?DpCs54{Ik#v|ZetctdsZ>+c_b98R&C>zh9L zWR2bbisItx>gg)w-721Y{99sT3#Aq}o@Cxz|2uO`{zs$@o(qdcOQ?R=Uv!y`Az5F)4|@; zI%BjJEeY$IxqqYK9SNI-Ef;19CKfyLeo}vacDj}qC)>l2X?qO)ruyzaw@K;xHO)!U zlc!HfV(gh|IZ<@!!aJFV7O)>{HS#S#t1I&^+{t_K(xYl~H~Vz+MCB$Q7Jat!YEYEp zlvYb$y;DrvLZf9*J!jKP;9^OB$mX?G!`qS3t$R_+oT3v`7rEGki>{tKIVfwbrMQ!U z>e^z{XHEhSV?sj{EV3Pgq7LgFF@2-;T#?TKI8z!t+I+`!ge z=(99N`^2iqhQw%tEdg!{Q&nak{#anMPvQ9W>xUnT7r4a9P2~OgKi=g3(fo5ammCiK zG5Z7q1A}UbYeY#(Vo9o1a#3nxNh*VpfuXssfswAEX^4T5m9c@9iLthUp_PF_lJ~`A d6b-rgDVb@NxHSliWrETpgQu&X%Q~loCIF_fds+Yh literal 0 HcmV?d00001 diff --git a/mods/redstone/mcl_observers/textures/mcl_observers_observer_top.png b/mods/redstone/mcl_observers/textures/mcl_observers_observer_top.png new file mode 100644 index 0000000000000000000000000000000000000000..02c677c53e3ef8bd478bed3a401e332a583d9c0b GIT binary patch literal 996 zcmeAS@N?(olHy`uVBq!ia0y~yU{C;I4h9AWhA=@@4F(1VmUKs7M+SzC{oH>NSwWJ? z9znhg3{|QO3=Pc;3_t%fFf_bmU???UV0e|lz+g3lfk8ZfQv6Xj1_lPEByV>YhX3vT zXZABNFmM)lL>4nJa0`PlBg3pY5)2Fs>?NMQuIvw)_?hIiJ;aP17#NtYd%8G=Se({9 z`PN_AmEpj{`{&O1?dHzoJ}oPHa<7uo97Rn-!&xys@jc()|KgX}FI4<&igOp!@!Ns7 zH|3URmZzsLtNZx#7YqB91sfg|sW!L?AEQq0=rNYI^ z%GD~a%%mk~fn@y3DSPLn{Mu0bxzkRJ$b_AGlJ&T6tbW4)}5sqBm8Ub z_lBF+RYp^mn7&qTNXXGJ?OCx?_0hDXBT{ExrKGC&L^Ek@l{|Pe(x^{C=Gxuu4a=U* zcb5(d<;(3$jyrfQpD*<=r~JIOD~Y^(EJ3p$?|oL03a*fWM9)U&g-=SW6X=SB`*+u56HPd0H)37xQT|Fn3g{)-_SZa(^8(8{E9 zjY)FW@zSmQ-!rbNH648DxbZ>)W0BdxLpzGyg&pU)>0Uf5CKVbwA-zmE`qS0Kqro~{ zZl8_sdlg(tO<6E6n9Z>@FC_GN`Es!{nL75rcdAv}D6w~GruurgE@n#QF+Y9uyJAaW