From 1f3c61912825f320374429805027f27939fe50a3 Mon Sep 17 00:00:00 2001 From: Cam B Date: Fri, 22 Jan 2021 00:56:43 +0000 Subject: [PATCH] Do not automatically connect to invalid faces --- internal2.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/internal2.lua b/internal2.lua index 1d24b24..a0dfa50 100644 --- a/internal2.lua +++ b/internal2.lua @@ -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