diff options
author | Vitaliy <silverunicorn2011@yandex.ru> | 2018-07-21 10:42:24 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-07-21 10:42:24 +0300 |
commit | a2340065925a2b622bba45661b8a5f96a888101a (patch) | |
tree | 3deda7346e2800d0f33049b643696fc35588e0c7 /mesecons_receiver | |
parent | 12fb09f452364da6c2986db5b35190c61d0b1d64 (diff) |
Fix mesecon receiver duplication (#419)
Diffstat (limited to 'mesecons_receiver')
-rw-r--r-- | mesecons_receiver/init.lua | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/mesecons_receiver/init.lua b/mesecons_receiver/init.lua index 73ab10e..476131d 100644 --- a/mesecons_receiver/init.lua +++ b/mesecons_receiver/init.lua @@ -209,7 +209,6 @@ function mesecon.receiver_place(rcpt_pos) local param2 = minetest.dir_to_facedir(minetest.facedir_to_dir(node.param2)) if string.find(nn.name, "mesecons:wire_") ~= nil then - minetest.dig_node(pos) minetest.set_node(pos, {name = rcvtype, param2 = param2}) mesecon.on_placenode(pos, nn) end @@ -218,8 +217,7 @@ end function mesecon.receiver_remove(rcpt_pos, dugnode) local pos = mesecon.receiver_get_pos_from_rcpt(rcpt_pos, dugnode.param2) local nn = minetest.get_node(pos) - if string.find(nn.name, "mesecons_receiver:receiver_") ~=nil then - minetest.dig_node(pos) + if string.find(nn.name, "mesecons_receiver:receiver_") ~= nil then local node = {name = "mesecons:wire_00000000_off"} minetest.set_node(pos, node) mesecon.on_placenode(pos, node) |