summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVanessa Ezekowitz <vanessaezekowitz@gmail.com>2013-10-04 14:36:17 -0400
committerVanessa Ezekowitz <vanessaezekowitz@gmail.com>2013-10-04 14:36:17 -0400
commitc80eeadf9cd80881e5ed9d0215e98ffca288ff7c (patch)
treea88d61e08269c9f8f74ed24f946a3e80d80950f2
parent6a9fdae4a17653b0742c0f635de13dfbeafb6c24 (diff)
downloadpipeworks-c80eeadf9cd80881e5ed9d0215e98ffca288ff7c.tar
pipeworks-c80eeadf9cd80881e5ed9d0215e98ffca288ff7c.tar.gz
pipeworks-c80eeadf9cd80881e5ed9d0215e98ffca288ff7c.tar.bz2
pipeworks-c80eeadf9cd80881e5ed9d0215e98ffca288ff7c.tar.xz
pipeworks-c80eeadf9cd80881e5ed9d0215e98ffca288ff7c.zip
fix incorrect usage of after_place_node
-rw-r--r--autocrafter.lua10
1 files changed, 6 insertions, 4 deletions
diff --git a/autocrafter.lua b/autocrafter.lua
index 9f9227d..164f6fe 100644
--- a/autocrafter.lua
+++ b/autocrafter.lua
@@ -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,