fix incorrect usage of after_place_node
authorVanessa Ezekowitz <vanessaezekowitz@gmail.com>
Fri, 4 Oct 2013 18:36:17 +0000 (14:36 -0400)
committerVanessa Ezekowitz <vanessaezekowitz@gmail.com>
Fri, 4 Oct 2013 18:36:17 +0000 (14:36 -0400)
autocrafter.lua

index 9f9227d843cb07a675a37a94a8e1f22708f6a070..164f6fe828a5b20b351f1df2f07e1fdd2b05665a 100644 (file)
@@ -110,11 +110,13 @@ minetest.register_node("pipeworks:autocrafter", {
                local inv = meta:get_inventory()
                return (inv:is_empty("src") and inv:is_empty("recipe") and inv:is_empty("dst"))
        end, 
-       after_place_node = tube_scanforobjects(pos),
+       after_place_node = function(pos)
+               tube_scanforobjects(pos)
+       end,
        after_dig_node = function(pos)
-                       tube_scanforobjects(pos)
-                       autocrafterCache[minetest.hash_node_position(pos)] = nil
-               end
+               tube_scanforobjects(pos)
+               autocrafterCache[minetest.hash_node_position(pos)] = nil
+       end
 })
 
 minetest.register_abm({nodenames = {"pipeworks:autocrafter"}, interval = 1, chance = 1,