mirror of
https://github.com/mt-mods/pipeworks.git
synced 2024-12-29 00:57:29 +01:00
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)
|
||||
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)
|
||||
|
Loading…
Reference in New Issue
Block a user