summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnthony Zhang <azhang9@gmail.com>2013-02-08 14:18:42 -0500
committerAnthony Zhang <azhang9@gmail.com>2013-02-08 14:18:42 -0500
commit4714c908ac4a7b1d305deba0f7001cb0f1217d9c (patch)
treef30fbe1462a0d2820c75a418534da3bcd259936f
parentccb343054072c27b27320ffb82fc8b5c6393c4d1 (diff)
downloadmesecons-4714c908ac4a7b1d305deba0f7001cb0f1217d9c.tar
mesecons-4714c908ac4a7b1d305deba0f7001cb0f1217d9c.tar.gz
mesecons-4714c908ac4a7b1d305deba0f7001cb0f1217d9c.tar.bz2
mesecons-4714c908ac4a7b1d305deba0f7001cb0f1217d9c.tar.xz
mesecons-4714c908ac4a7b1d305deba0f7001cb0f1217d9c.zip
Fix #73 - receiver wire drops down one node when connected button is dug.
-rw-r--r--mesecons_receiver/init.lua4
1 files changed, 3 insertions, 1 deletions
diff --git a/mesecons_receiver/init.lua b/mesecons_receiver/init.lua
index de2b535..24cc5c9 100644
--- a/mesecons_receiver/init.lua
+++ b/mesecons_receiver/init.lua
@@ -128,8 +128,10 @@ function mesecon:receiver_remove(rcpt_pos, dugnode)
local nn = minetest.env:get_node(pos)
if string.find(nn.name, "mesecons_receiver:receiver_") ~=nil then
minetest.env:dig_node(pos)
- minetest.env:place_node(pos, {name = "mesecons:wire_00000000_off"})
+ local node = {name = "mesecons:wire_00000000_off"}
+ minetest.env:add_node(pos, node)
mesecon:update_autoconnect(pos)
+ mesecon.on_placenode(pos, node)
end
end