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 0000000000..95222145e8 --- /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 0000000000..250abfb030 --- /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 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE3?yBabR7dyEa{HEjtmSN`?>!lvVtU&J%W50 z7^+km7#f-x7=Hc-(k~epN(~qoUL`OvSj}Ky5YL|!f7FeEfzdI*C&bm**jP_b&&bF~ zTU%RBPEJWlNkv6PS65eET|FQmz{|_a-QC^O)6>bx$=cf5&d$!q$H&jlFCrqs#l^+M z#KhOvx1ph-yu3U#G&DFkI3put+O%o?{rw>!A+fQs3l=Qs?d@%DZmz1TYHVzjm6eT& ziK(uxR!~qdH#bjBO$`qZx3#sku&|JpmbSCDwzsiyadL8Xa&mKacCxoOGBBvEt*x)G zw=grawX$+@aIm(purfDyu(frxv$L_ZG&M4^G&c_p2yl0G?da&}>gww0>FMk1^Kf$u z4h#f3$l1{`GAwNF+_`aaamvcdii(O>j0_r#48cqcmP`z)jLcq)OhNwsCX9?yj7$-s zp@DvWVId*rCMM>lrUAab!otGE#l?Q!-X~6+2nh;uc5?Fd_BJ*&)YaD3)6p@~*Z=?j zf5)3PFJQnkCV9KNWT_@iQL70(Y)*K0-AbW|YuPggQCVnP4Z4WVH z2L=WvQ%@Ji5R21qCwB+kau8{o?y!Vcs_ST5(Mm4W4Da&B6*u2Z+Hu9(v`g?q*y*s_ zS^Dq)Gug5)Gk$CRWxi+H=KtIOTdEs-b9gQdYGYhqax8{nDW}$KzuC_w>#Pa#*FAkI zvb)>c`^dS)^F*gPvYy^FUwn;;=DIxvUizn}dTkBTou0k**6OQQw{HDfRl7HE{q^4K zEo&_Ng#WGzF1%~RQS(9Shr)!jjrZ4t#a=Izx$ej`myN~b)z+l$EoQS8OzLiVJx$=o zot6TXtb7K8+}$CY%sZx@e!Ad!P2J5+_qN@Bo3uMuB=@#T8{_S^oget7G-@U~$rxQe zm13l}PV;q1we7JP?6-=xmrK>!12rD~>v=JE4&V86lTs?G-Xu2q33#e< zPL303cQ7b3vaz<8@13NmR${$T{M%H2mM;f>&0#X|ICuQ<$&@KP5=(7_;#5@3R!&I~ zd>_nC}Q!>*kacdA3%e)WNz~JfX K=d#Wzp$PyIBeQ}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 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE3?yBabR7dyEa{HEjtmSN`?>!lvVtU&J%W50 z7^+km7#f-x7=Hc-(k~epN(~qoUL`OvSj}Ky5YL|!f7FeEfzdR;C&b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8n7+|^E_F~d^lIr_i_#aCHfKY=_QbDkV2fc9ZeVLK^jR9CePUH)Lt?bS zmH;<}sVcJ%e=M-sr*QoG^}`Rv3tZylCi4FLA8+#iX#TmIOAZJAn0*46FjPxiBT7;d zOH!?pi&B9UgOP!uxvqhcuAym&fsvK5ft87|wt=CQfkBe@#bgu>x%nxXX_dG&2#aNc P(j$YXtDnm{r-UW|rm=fk 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!ia0vp^3Lwk@BpAX3RW*PVOS+@4BLl<6e(pbstRTr`k04(L zhALGChK6PahM)g|^h*YYQUeBtR|yOZRx=nF#PcV`A9Vw&WlHjPcVYP7-hXC4kjGiz z5n0T@z%2~Ij105pNB{-dOFVsD*&j0TGs$Uth#5NoHC^{~aSX9It$XsVzp^XCfrt0c zo$=evoyUDzR`ldvC8arvnudn6VtV3xzQ6y)FR@>!_}LWaE~ewR18;B2Ezc}ZPhVE| z@#ilV_A3iEJSb9aa1%aI@vJ3k@hfq*IWYkjbG#Z{jvP2+)S2|#F>zPLL+&3xeBK`v zTz$$cTtVC4+|n`fdF$c_Mt`1^`pw^}7&evpwvNB#(qml>NnQs-XY4!oJ9v-$p2J!i z{+^Em8)x`-Jd0WRWp<6!!}5B?s`jmOK5e?&XXs_rrajfEewIsxi0qh2daP;sn?2tz z`nwmLH*4O%!?<`#!S!1UbQJce$0U04gv)0H&8sP7Kjp1EOEpIL*WB+7H?6CTrYtdi zt=^E3qhZ>!VyEh(X-P+<&b&%VRqu&r(%33_@Mfe@pMuP_yW1OS0d#d2Lq`dHGm^WM@6t^5^>AIxl*(g%`sm4T6Q;P_JxploqQ~3l>t+|YKdz^NlIc#s#S7PDv)9@GB7mPH89dO yGz~E@vNATXGBMURFtjo-Nb