mirror of
https://github.com/joe7575/techpack.git
synced 2024-12-01 19:43:52 +01:00
disable machines outputting to themselves
This commit is contained in:
parent
68e30349ae
commit
ebd9864ce0
@ -139,6 +139,7 @@ local function get_dest_node(pos, side)
|
|||||||
local dir = side_to_dir(side, node.param2)
|
local dir = side_to_dir(side, node.param2)
|
||||||
local spos, sdir = Tube:get_connected_node_pos(pos, dir)
|
local spos, sdir = Tube:get_connected_node_pos(pos, dir)
|
||||||
if not (spos and sdir) then return end
|
if not (spos and sdir) then return end
|
||||||
|
if vector.equals(pos, spos) then return end
|
||||||
_,node = Tube:get_node(spos)
|
_,node = Tube:get_node(spos)
|
||||||
local out_side = dir_to_side(tubelib2.Turn180Deg[sdir], node.param2)
|
local out_side = dir_to_side(tubelib2.Turn180Deg[sdir], node.param2)
|
||||||
return spos, out_side, Name2Name[node.name] or node.name
|
return spos, out_side, Name2Name[node.name] or node.name
|
||||||
|
Loading…
Reference in New Issue
Block a user