mirror of
https://github.com/joe7575/techpack.git
synced 2024-11-29 10:33:47 +01:00
fix crash when tube too long (and spurious whitespace changes)
This commit is contained in:
parent
d6b0696746
commit
342083bf03
@ -138,6 +138,7 @@ local function get_dest_node(pos, side)
|
|||||||
local _,node = Tube:get_node(pos)
|
local _,node = Tube:get_node(pos)
|
||||||
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
|
||||||
_,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