summaryrefslogtreecommitdiff
path: root/mesecons/services.lua
diff options
context:
space:
mode:
Diffstat (limited to 'mesecons/services.lua')
-rw-r--r--mesecons/services.lua10
1 files changed, 9 insertions, 1 deletions
diff --git a/mesecons/services.lua b/mesecons/services.lua
index 1e12de0..b1388ec 100644
--- a/mesecons/services.lua
+++ b/mesecons/services.lua
@@ -21,7 +21,8 @@ mesecon.on_placenode = function(pos, node)
end
--mesecon.receptor_on (pos, mesecon.conductor_get_rules(node))
elseif mesecon.is_conductor_on(node) then
- minetest.swap_node(pos, {name = mesecon.get_conductor_off(node)})
+ node.name = mesecon.get_conductor_off(node)
+ minetest.swap_node(pos, node)
end
end
@@ -62,6 +63,13 @@ mesecon.on_dignode = function(pos, node)
mesecon.execute_autoconnect_hooks_queue(pos, node)
end
+function mesecon.on_blastnode(pos, intensity)
+ local node = minetest.get_node(pos)
+ minetest.remove_node(pos)
+ mesecon.on_dignode(pos, node)
+ return minetest.get_node_drops(node.name, "")
+end
+
minetest.register_on_placenode(mesecon.on_placenode)
minetest.register_on_dignode(mesecon.on_dignode)