forked from mtcontrib/pipeworks
fix crash where I forgot to actually index the metadata elements I added to
the valves' on-punch-node functions
This commit is contained in:
parent
4b0b137f94
commit
e103143ea7
@ -319,6 +319,7 @@ for a in ipairs(axes) do
|
|||||||
minetest.register_on_punchnode(function (pos, node)
|
minetest.register_on_punchnode(function (pos, node)
|
||||||
if node.name=="pipeworks:valve_on_"..axes[a] then
|
if node.name=="pipeworks:valve_on_"..axes[a] then
|
||||||
minetest.env:add_node(pos, { name = "pipeworks:valve_off_"..axes[a] })
|
minetest.env:add_node(pos, { name = "pipeworks:valve_off_"..axes[a] })
|
||||||
|
local meta = minetest.env:get_meta(pos)
|
||||||
meta:set_int("pipelike",0)
|
meta:set_int("pipelike",0)
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
@ -326,6 +327,7 @@ for a in ipairs(axes) do
|
|||||||
minetest.register_on_punchnode(function (pos, node)
|
minetest.register_on_punchnode(function (pos, node)
|
||||||
if node.name=="pipeworks:valve_off_"..axes[a] then
|
if node.name=="pipeworks:valve_off_"..axes[a] then
|
||||||
minetest.env:add_node(pos, { name = "pipeworks:valve_on_"..axes[a] })
|
minetest.env:add_node(pos, { name = "pipeworks:valve_on_"..axes[a] })
|
||||||
|
local meta = minetest.env:get_meta(pos)
|
||||||
meta:set_int("pipelike",1)
|
meta:set_int("pipelike",1)
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|
Loading…
Reference in New Issue
Block a user