mirror of
https://github.com/joe7575/techpack.git
synced 2024-11-22 23:33:44 +01:00
remove tubes bug fixed
This commit is contained in:
parent
c4c7bbf9f1
commit
f6d564ac0b
@ -174,20 +174,20 @@ end
|
|||||||
function tubelib.delete_meta_data(pos, node)
|
function tubelib.delete_meta_data(pos, node)
|
||||||
local dir1, dir2 = get_tube_dirs(pos, node)
|
local dir1, dir2 = get_tube_dirs(pos, node)
|
||||||
local cnt1 = 0
|
local cnt1 = 0
|
||||||
local dir
|
local dir, npos
|
||||||
if dir1 then
|
if dir1 then
|
||||||
cnt1, pos, dir = tubelib.walk_to_peer(pos, dir1)
|
cnt1, npos, dir = tubelib.walk_to_peer(pos, dir1)
|
||||||
-- delete meta on peer tube
|
-- delete meta on peer tube
|
||||||
if cnt1 > 0 then
|
if cnt1 > 0 then
|
||||||
minetest.get_meta(pos):from_table(nil)
|
minetest.get_meta(npos):from_table(nil)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
local cnt2 = 0
|
local cnt2 = 0
|
||||||
if dir2 then
|
if dir2 then
|
||||||
cnt2, pos, dir = tubelib.walk_to_peer(pos, dir2)
|
cnt2, npos, dir = tubelib.walk_to_peer(pos, dir2)
|
||||||
-- delete meta on peer tube
|
-- delete meta on peer tube
|
||||||
if cnt2 > 0 then
|
if cnt2 > 0 then
|
||||||
minetest.get_meta(pos):from_table(nil)
|
minetest.get_meta(npos):from_table(nil)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
return cnt1 + cnt2
|
return cnt1 + cnt2
|
||||||
|
Loading…
Reference in New Issue
Block a user