Fix invalid node name if node was changed in after_place_node callback (fixes #93).

This commit is contained in:
Anthony Zhang 2013-04-14 13:54:33 -04:00
parent c08e868be2
commit 3b1afb1783

View File

@ -1,4 +1,5 @@
mesecon.on_placenode = function (pos, node) mesecon.on_placenode = function (pos)
local node = minetest.env:get_node(pos)
if mesecon:is_receptor_on(node.name) then if mesecon:is_receptor_on(node.name) then
mesecon:receptor_on(pos, mesecon:receptor_get_rules(node)) mesecon:receptor_on(pos, mesecon:receptor_get_rules(node))
elseif mesecon:is_powered(pos) then elseif mesecon:is_powered(pos) then