forked from mtcontrib/pipeworks
Fix hacky_swap_node to not repeatedly swap the same node in over and over
This commit is contained in:
parent
59362e3d20
commit
cedb49d887
|
@ -91,6 +91,9 @@ function hacky_swap_node(pos,name)
|
|||
local node=minetest.get_node(pos)
|
||||
local meta=minetest.get_meta(pos)
|
||||
local meta0=meta:to_table()
|
||||
if node.name == name then
|
||||
return
|
||||
end
|
||||
node.name=name
|
||||
minetest.add_node(pos, node)
|
||||
local meta=minetest.get_meta(pos)
|
||||
|
|
|
@ -18,6 +18,9 @@ function hacky_swap_node(pos,name)
|
|||
local node=minetest.get_node(pos)
|
||||
local meta=minetest.get_meta(pos)
|
||||
local meta0=meta:to_table()
|
||||
if node.name == name then
|
||||
return
|
||||
end
|
||||
node.name=name
|
||||
minetest.add_node(pos, node)
|
||||
local meta=minetest.get_meta(pos)
|
||||
|
|
Loading…
Reference in New Issue
Block a user