From e103143ea72c77733d8026f3dc81a332832b77f6 Mon Sep 17 00:00:00 2001 From: Vanessa Ezekowitz Date: Tue, 21 Aug 2012 05:20:47 -0400 Subject: fix crash where I forgot to actually index the metadata elements I added to the valves' on-punch-node functions --- devices.lua | 2 ++ 1 file changed, 2 insertions(+) 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) -- cgit v1.2.3