mirror of
https://github.com/joe7575/tubelib2.git
synced 2024-11-19 22:13:49 +01:00
Do not automatically connect to invalid faces
This commit is contained in:
parent
f5cbef0cd7
commit
1f3c619128
@ -336,6 +336,10 @@ function Tube:add_tube_dir(pos, dir)
|
||||
if param2 then
|
||||
local d1, d2, num = self:decode_param2(npos, param2)
|
||||
if not num then return end
|
||||
-- if invalid face, do nothing
|
||||
local node = self:get_node_lvm(pos)
|
||||
local valid = self:is_valid_dir(node, dir)
|
||||
if valid == false then return end
|
||||
-- not already connected to the new tube?
|
||||
dir = Turn180Deg[dir]
|
||||
if d1 ~= dir and dir ~= d2 then
|
||||
|
Loading…
Reference in New Issue
Block a user