From c18c0a51e8ac7e8394b2beadec3e1ace777c7100 Mon Sep 17 00:00:00 2001 From: paly2 Date: Sat, 12 Dec 2015 10:51:44 +0100 Subject: [PATCH] Add the igniter node --- README.md | 1 + moremesecons_igniter/depends.txt | 2 ++ moremesecons_igniter/init.lua | 24 ++++++++++++++++++ .../textures/moremesecons_igniter.png | Bin 0 -> 805 bytes 4 files changed, 27 insertions(+) create mode 100644 moremesecons_igniter/depends.txt create mode 100644 moremesecons_igniter/init.lua create mode 100644 moremesecons_igniter/textures/moremesecons_igniter.png diff --git a/README.md b/README.md index 10e8e88..2d3681e 100644 --- a/README.md +++ b/README.md @@ -15,6 +15,7 @@ MoreMesecons is a mod for minetest wich adds some mesecons items. * `Craftable Command Block` : A command block with just some commands accepted. The admin can change the accepted command (first line of the init.lua), default "tell". Only "@nearest" can be used in the commands, and the admin can change the maximum distance of "@nearest" (default 8 blocks). * `Dual Delayer` : If it receives a mesecons signal, port 1 turns on immediatly and port 2 turns on 0.4 seconds later. At the end of the signal, port 2 turns off immediatly and port 1 turns off 0.4 secondes later. For example, this is useful for double extenders. * `Entity Detector` : You can use it to detect an entity. You can choose the entity to detect by right-click (use itemstring, for example "mobs:rat". To detect a dropped item, write "__builtin:item". To detect a specific dropped item, write its itemstring (for example "default:cobble")). +* `Igniter` : This node is a lighter that ignites ajacent flammable nodes (including TNT). * `Player Killer` : This block kills the nearest player (with a maximal distance of 8 blocks by default) (if this player isn't its owner) when it receives a mesecons signal. * `Sayer` : This node sends a message to every players inside a radius of 8 nodes. * `Signal Changer` : If it receives a signal on its pin "F", it turns on. If ti receives a signal on its pin "O", it turns off. diff --git a/moremesecons_igniter/depends.txt b/moremesecons_igniter/depends.txt new file mode 100644 index 0000000..f95ba13 --- /dev/null +++ b/moremesecons_igniter/depends.txt @@ -0,0 +1,2 @@ +mesecons +fire diff --git a/moremesecons_igniter/init.lua b/moremesecons_igniter/init.lua new file mode 100644 index 0000000..7df0a87 --- /dev/null +++ b/moremesecons_igniter/init.lua @@ -0,0 +1,24 @@ +local function igniter_on(pos) + local fire_node = {name="fire:basic_flame"} + local igniter_node = {name="moremesecons_igniter:igniter"} + minetest.set_node(pos, fire_node) + minetest.after(0.8, minetest.set_node, pos, igniter_node) +end + +minetest.register_node("moremesecons_igniter:igniter", { + description="Igniter", + paramtype = "light", + tiles = {"moremesecons_igniter.png"}, + groups = {cracky=3}, + mesecons = { + effector = { + action_on = igniter_on + }} +}) + + +minetest.register_craft({ + output = "moremesecons_igniter:igniter", + recipe = { {"default:torch"}, + {"default:mese_crystal_fragment"},} +}) diff --git a/moremesecons_igniter/textures/moremesecons_igniter.png b/moremesecons_igniter/textures/moremesecons_igniter.png new file mode 100644 index 0000000000000000000000000000000000000000..401ef619795371510f5fd5db14aba0d03ae4130f GIT binary patch literal 805 zcmV+=1KRwFP)A5IHvL=_&vK0GscUYuHaFeo_U~cc7CrTY-^1_1m+$w>R}vuj&pPOK zfB^AluQ3PhenYb8`QwOz z>I#KD)fU2WBbUC$c<^=n*Zs(F8h{yQxv+TD>=fHwRv|#NRXW9m8LAL_rirJG(l45~ z>mB0tD*rzvNuSoJLc0|yVllc!CpnQM5>60H=Fqh|)GIHFeiCgOd8-*o9GfFzLkUW< zS)wCjXg3OAiET5npAP`g+iIsqbCF7=sJtE`vs-7NFM?k0Mh*v}IL~~*XtR(pnE2N2 zFL?1`0D$pbH8{)6$VwX5bQJ)j=EgT)W2~_f*?l<(K(K!pZ-QdNds?f8X z*LUCIUO1JkKk*yDR_;LQj*+X)^DgiP&$8*T@;0;xCT5p2Qa1r1nX!D1*(W!V8B$TK zKIG`mDF9f{4w82&81f2bpY2GC?*R}ReuqW3GTGo{;PHEMi8xeGW-#&|xx#^Lv>4#% zTma(n80p{_w4ESM;9i#@pb*R_Ec#zSH!ybz@ITDE19LsI zBg)Wm4>nIZjwT%Lc+r_;C-V6Hcfyar0Ccy`QZla(TG81R=WCiPVXDA+D_z!xw5rx^sO| jT-&Q$V!zw;&nSNfnO-(b0{vE|00000NkvXXu0mjfa!78v literal 0 HcmV?d00001