summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVanessa Ezekowitz <vanessaezekowitz@gmail.com>2012-08-21 05:20:47 -0400
committerVanessa Ezekowitz <vanessaezekowitz@gmail.com>2012-08-21 05:20:47 -0400
commite103143ea72c77733d8026f3dc81a332832b77f6 (patch)
tree3b7f9ed2f06fdb31442ff22d1e11da07b44bacef
parent4b0b137f948f3d07f4146679bee75d98363da91b (diff)
downloadpipeworks-e103143ea72c77733d8026f3dc81a332832b77f6.tar
pipeworks-e103143ea72c77733d8026f3dc81a332832b77f6.tar.gz
pipeworks-e103143ea72c77733d8026f3dc81a332832b77f6.tar.bz2
pipeworks-e103143ea72c77733d8026f3dc81a332832b77f6.tar.xz
pipeworks-e103143ea72c77733d8026f3dc81a332832b77f6.zip
fix crash where I forgot to actually index the metadata elements I added to
the valves' on-punch-node functions
-rw-r--r--devices.lua2
1 files changed, 2 insertions, 0 deletions
diff --git a/devices.lua b/devices.lua
index 71e8eac..b490d01 100644
--- a/devices.lua
+++ b/devices.lua
@@ -319,6 +319,7 @@ for a in ipairs(axes) do
minetest.register_on_punchnode(function (pos, node)
if node.name=="pipeworks:valve_on_"..axes[a] then
minetest.env:add_node(pos, { name = "pipeworks:valve_off_"..axes[a] })
+ local meta = minetest.env:get_meta(pos)
meta:set_int("pipelike",0)
end
end)
@@ -326,6 +327,7 @@ for a in ipairs(axes) do
minetest.register_on_punchnode(function (pos, node)
if node.name=="pipeworks:valve_off_"..axes[a] then
minetest.env:add_node(pos, { name = "pipeworks:valve_on_"..axes[a] })
+ local meta = minetest.env:get_meta(pos)
meta:set_int("pipelike",1)
end
end)