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 0000000..401ef61 Binary files /dev/null and b/moremesecons_igniter/textures/moremesecons_igniter.png differ