From ebd9864ce08e4061e305526d05b6d9d29fe2ad1f Mon Sep 17 00:00:00 2001 From: flux <25628292+fluxionary@users.noreply.github.com> Date: Thu, 12 Sep 2019 22:25:06 +0000 Subject: [PATCH] disable machines outputting to themselves --- tubelib/command.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/tubelib/command.lua b/tubelib/command.lua index 4380193..6e226bf 100644 --- a/tubelib/command.lua +++ b/tubelib/command.lua @@ -139,6 +139,7 @@ local function get_dest_node(pos, side) local dir = side_to_dir(side, node.param2) local spos, sdir = Tube:get_connected_node_pos(pos, dir) if not (spos and sdir) then return end + if vector.equals(pos, spos) then return end _,node = Tube:get_node(spos) local out_side = dir_to_side(tubelib2.Turn180Deg[sdir], node.param2) return spos, out_side, Name2Name[node.name] or node.name