max_tube_length bugfix

This commit is contained in:
Joachim Stolberg 2020-01-03 16:12:37 +01:00
parent 57abcec464
commit db90c07dfd
6 changed files with 10 additions and 11 deletions

@ -55,7 +55,7 @@ optional: intllib
# License
Copyright (C) 2017-2019 Joachim Stolberg
Copyright (C) 2017-2020 Joachim Stolberg
Code: Licensed under the GNU LGPL version 2.1 or later.
See LICENSE.txt and http://www.gnu.org/licenses/lgpl-2.1.txt
Textures: CC0
@ -78,5 +78,6 @@ Textures: CC0
- 2019-05-09 v1.4 * Attribute 'tube_type' added
- 2019-07-12 v1.5 * internal handling of secondary nodes changed
- 2019-10-25 v1.6 * callback 'tubelib2_on_update2' added
- 2020-01-03 v1.7 * max_tube_length bugfix

@ -3,7 +3,7 @@
Tube Library 2
==============
Copyright (C) 2018 Joachim Stolberg
Copyright (C) 2018-2020 Joachim Stolberg
LGPLv2.1+
See LICENSE.txt for more information
@ -101,7 +101,8 @@ function Tube:update_secondary_node(pos1, dir1, pos2, dir2)
ndef.tubelib2_on_update2(pos1, dir1, self, node)
elseif ndef.tubelib2_on_update then
ndef.tubelib2_on_update(node, pos1, dir1, pos2, Turn180Deg[dir2])
elseif self.clbk_update_secondary_node then
end
if self.clbk_update_secondary_node then
self.clbk_update_secondary_node(node, pos1, dir1, pos2, Turn180Deg[dir2])
end
end

@ -3,7 +3,7 @@
Tube Library 2
==============
Copyright (C) 2018 Joachim Stolberg
Copyright (C) 2018-2020 Joachim Stolberg
LGPLv2.1+
See LICENSE.txt for more information
@ -390,9 +390,6 @@ function Tube:walk_tube_line(pos, dir)
pos, dir = new_pos, new_dir
cnt = cnt + 1
end
if cnt > self.max_tube_length then
return
end
if cnt > 0 then
return pos, dir, cnt
end

@ -3,7 +3,7 @@
Tube Library 2
==============
Copyright (C) 2017-2018 Joachim Stolberg
Copyright (C) 2017-2020 Joachim Stolberg
LGPLv2.1+
See LICENSE.txt for more information

@ -3,7 +3,7 @@
Tube Library 2
==============
Copyright (C) 2017-2018 Joachim Stolberg
Copyright (C) 2017-2020 Joachim Stolberg
LGPLv2.1+
See LICENSE.txt for more information
@ -13,7 +13,7 @@
]]--
-- Version for compatibility checks, see readme.md/history
tubelib2.version = 1.6
tubelib2.version = 1.7
-- for lazy programmers
local S = function(pos) if pos then return minetest.pos_to_string(pos) end end

@ -3,7 +3,7 @@
Tube Library 2
==============
Copyright (C) 2017-2018 Joachim Stolberg
Copyright (C) 2017-2020 Joachim Stolberg
LGPLv2.1+
See LICENSE.txt for more information