From 28bca749be9779dcb483ca29f1c2855aad1f0bcb Mon Sep 17 00:00:00 2001 From: Whiskers75 - Date: Thu, 21 Jun 2012 18:54:35 +0100 Subject: [PATCH] AND block works! (YIPPEE!!!) See WHISKERS75_README. --- WHISKERS75_README | 9 ++++++ mesecons/settings.lua | 2 +- mesecons_temperest/init.lua | 30 ++++++++++++++++++ .../textures/whiskers75andblock.png | Bin 0 -> 364 bytes mesecons_whiskers75/depends.txt | 3 -- mesecons_whiskers75/init.lua | 27 ---------------- mesecons_whiskers75/textures/Untitled.xcf | Bin 821 -> 0 bytes .../textures/whiskers75andblock.png | Bin 242 -> 0 bytes 8 files changed, 40 insertions(+), 31 deletions(-) create mode 100644 WHISKERS75_README create mode 100644 mesecons_temperest/textures/whiskers75andblock.png delete mode 100644 mesecons_whiskers75/depends.txt delete mode 100644 mesecons_whiskers75/init.lua delete mode 100644 mesecons_whiskers75/textures/Untitled.xcf delete mode 100644 mesecons_whiskers75/textures/whiskers75andblock.png diff --git a/WHISKERS75_README b/WHISKERS75_README new file mode 100644 index 0000000..3511ef7 --- /dev/null +++ b/WHISKERS75_README @@ -0,0 +1,9 @@ +README for Whiskers75's contributions +------------------------------------- + +1: You need Temperest's code enabled (ENABLE_TEMPEREST=1 in settings.lua). +2: To work it, place mesecons (on) in the position x plus or minus 1 from the block. +3: Then punch, and off mesecons in the position y plus or minus 1 from the block will be powered. +4: Currently, you will have to dig the mesecons in the above positions up if the circuit changes, but that will be fixed. +5: The name of the block is mesecons_temperest:andblock. +6: Enjoy! diff --git a/mesecons/settings.lua b/mesecons/settings.lua index c68c2a8..7366e3b 100644 --- a/mesecons/settings.lua +++ b/mesecons/settings.lua @@ -2,4 +2,4 @@ ENABLE_PISTON_ANIMATION=0 BLINKY_PLANT_INTERVAL=3 OLD_PISTON_DIRECTION=0 -ENABLE_TEMPEREST=0 \ No newline at end of file +ENABLE_TEMPEREST=1 diff --git a/mesecons_temperest/init.lua b/mesecons_temperest/init.lua index 2bda111..c54f3e7 100644 --- a/mesecons_temperest/init.lua +++ b/mesecons_temperest/init.lua @@ -217,3 +217,33 @@ if ENABLE_TEMPEREST==1 then } }) end + +--End Temperest's code + +--Whiskers75's code +--AND block + +local i + + +-- Make the block: + +minetest.register_node ("mesecons_temperest:andblock", { + drawtype = raillike, + description = "AND block", + tile_images = {"whiskers75andblock.png"}, + inventory_image = {"whiskers75andblock.png"}, + sunlight_propagates = true, + paramtype = 'light', + walkable = true, + groups = {dig_immediate=2}, + material = minetest.digprop_constanttime(1.0), + }) + +minetest.register_on_punchnode(function(pos, node, puncher) + if node.name=="mesecons_temperest:andblock" then + anode = minetest.env:get_node({x=pos.x-1, y=pos.y, z=pos.z}) + bnode = minetest.env:get_node({x=pos.x+1, y=pos.y, z=pos.z}) + if anode.name=="mesecons:mesecon_on" and bnode.name=="mesecons:mesecon_on" then mesecon:receptor_on({x=pos.x, y=pos.y+1, z=pos.z}) end + end +end) diff --git a/mesecons_temperest/textures/whiskers75andblock.png b/mesecons_temperest/textures/whiskers75andblock.png new file mode 100644 index 0000000000000000000000000000000000000000..63fc07a2d7954a445097bb2471d9832b2c3990c0 GIT binary patch literal 364 zcmeAS@N?(olHy`uVBq!ia0vp^A|TAc1SFYWcSQjy#^NA%Cx&(BWL^R}oCO|{#S9GG z!XV7ZFl&wkP>{XE)7O>#4x6Z;47cvP%xs{LWQl7;iF1B#Zfaf$gL6@8Vo7R>LV0FM zhJw4NZ$Nk>pEyv_O-~oc5R22vfByfsXWrS+*~rx3|GDw}@srp0Jh+?n$y9s8NuCMw z_y76r)%5H?&;N-xZ`-~5{rkVX+}WN96?Gq8pX^-!{MG!gQbn2Bg)1~SoP6`Y=*^Go zo1M-yRn3`o$7jx_oS^bLyM%-U4#5v)54O5o-}CtLzuNiz2Yqe-JY8b2d4c41Mrq~S zzxT_#Mz+lRSNHMN_uD{w`d8*RSn{*~`1L*d@}cl*LN*6H;-W>}P3 zn9h)#nV5LkBPzrG$JdI6N0k~`|IUAipBXE+KkXQ!wkN~J^=lol{~v*p5g_z997Z2RcgR&J`6u zKtYubS)w3~nLT{O5n-kA&hF0KoqT6=XUwLC#VkHD6~svf;&nh(@i_)cod-oBAV{2lIGhzowd$eBDRorHfqA!+hUb-_CF!(G#Kj!cWu^| zd!aeo*35d^#N{F5t}!qJ@_UvQnBngM$^EzW)7iArf5<|8lngn4Kb4Md3~k?=xZ<}J zGTAON-A)RWGENt;pK&Cmoa2=oujY6y#}B}1Eg5?tvZqhhp|FE9}bsdQ3!KT&-E2?2_)RkBQ$%cPjVyDl&h g3aJ#{S5(hHOn~Bj6))n&A}+@8t_w_rLMol~8>j=xo&W#< diff --git a/mesecons_whiskers75/textures/whiskers75andblock.png b/mesecons_whiskers75/textures/whiskers75andblock.png deleted file mode 100644 index dc4af0e6043ee77b15e5322c1f9506a1e111bb40..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 242 zcmeAS@N?(olHy`uVBq!ia0vp^A|TAc1SFYWcSQjy#^NA%Cx&(BWL^R}oCO|{#S9GG z!XV7ZFl&wkP>{XE)7O>#4x6X|yVUztFHC?!k|nMYCC>S|xv6<249-QVi6yBi3gww4 z84B*6z5(HleBwYw@t!V@Ar_~T|NQ@N&%CptvysW*j>-JLWk26+KmEgW^MgqhKYyD# z&MwS)mh@=J+WCTJ_CLP1G&Vjwc>cKfzIf9ISN47QtF^EZ*Brw#o+1c=d#Wzp$PzYIal2P