mirror of
https://github.com/joe7575/tubelib2.git
synced 2024-08-19 13:04:14 +02:00
max_tube_length bugfix
This commit is contained in:
parent
57abcec464
commit
db90c07dfd
@ -55,7 +55,7 @@ optional: intllib
|
|||||||
|
|
||||||
|
|
||||||
# License
|
# License
|
||||||
Copyright (C) 2017-2019 Joachim Stolberg
|
Copyright (C) 2017-2020 Joachim Stolberg
|
||||||
Code: Licensed under the GNU LGPL version 2.1 or later.
|
Code: Licensed under the GNU LGPL version 2.1 or later.
|
||||||
See LICENSE.txt and http://www.gnu.org/licenses/lgpl-2.1.txt
|
See LICENSE.txt and http://www.gnu.org/licenses/lgpl-2.1.txt
|
||||||
Textures: CC0
|
Textures: CC0
|
||||||
@ -78,5 +78,6 @@ Textures: CC0
|
|||||||
- 2019-05-09 v1.4 * Attribute 'tube_type' added
|
- 2019-05-09 v1.4 * Attribute 'tube_type' added
|
||||||
- 2019-07-12 v1.5 * internal handling of secondary nodes changed
|
- 2019-07-12 v1.5 * internal handling of secondary nodes changed
|
||||||
- 2019-10-25 v1.6 * callback 'tubelib2_on_update2' added
|
- 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
|
Tube Library 2
|
||||||
==============
|
==============
|
||||||
|
|
||||||
Copyright (C) 2018 Joachim Stolberg
|
Copyright (C) 2018-2020 Joachim Stolberg
|
||||||
|
|
||||||
LGPLv2.1+
|
LGPLv2.1+
|
||||||
See LICENSE.txt for more information
|
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)
|
ndef.tubelib2_on_update2(pos1, dir1, self, node)
|
||||||
elseif ndef.tubelib2_on_update then
|
elseif ndef.tubelib2_on_update then
|
||||||
ndef.tubelib2_on_update(node, pos1, dir1, pos2, Turn180Deg[dir2])
|
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])
|
self.clbk_update_secondary_node(node, pos1, dir1, pos2, Turn180Deg[dir2])
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
Tube Library 2
|
Tube Library 2
|
||||||
==============
|
==============
|
||||||
|
|
||||||
Copyright (C) 2018 Joachim Stolberg
|
Copyright (C) 2018-2020 Joachim Stolberg
|
||||||
|
|
||||||
LGPLv2.1+
|
LGPLv2.1+
|
||||||
See LICENSE.txt for more information
|
See LICENSE.txt for more information
|
||||||
@ -390,9 +390,6 @@ function Tube:walk_tube_line(pos, dir)
|
|||||||
pos, dir = new_pos, new_dir
|
pos, dir = new_pos, new_dir
|
||||||
cnt = cnt + 1
|
cnt = cnt + 1
|
||||||
end
|
end
|
||||||
if cnt > self.max_tube_length then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
if cnt > 0 then
|
if cnt > 0 then
|
||||||
return pos, dir, cnt
|
return pos, dir, cnt
|
||||||
end
|
end
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
Tube Library 2
|
Tube Library 2
|
||||||
==============
|
==============
|
||||||
|
|
||||||
Copyright (C) 2017-2018 Joachim Stolberg
|
Copyright (C) 2017-2020 Joachim Stolberg
|
||||||
|
|
||||||
LGPLv2.1+
|
LGPLv2.1+
|
||||||
See LICENSE.txt for more information
|
See LICENSE.txt for more information
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
Tube Library 2
|
Tube Library 2
|
||||||
==============
|
==============
|
||||||
|
|
||||||
Copyright (C) 2017-2018 Joachim Stolberg
|
Copyright (C) 2017-2020 Joachim Stolberg
|
||||||
|
|
||||||
LGPLv2.1+
|
LGPLv2.1+
|
||||||
See LICENSE.txt for more information
|
See LICENSE.txt for more information
|
||||||
@ -13,7 +13,7 @@
|
|||||||
]]--
|
]]--
|
||||||
|
|
||||||
-- Version for compatibility checks, see readme.md/history
|
-- Version for compatibility checks, see readme.md/history
|
||||||
tubelib2.version = 1.6
|
tubelib2.version = 1.7
|
||||||
|
|
||||||
-- for lazy programmers
|
-- for lazy programmers
|
||||||
local S = function(pos) if pos then return minetest.pos_to_string(pos) end end
|
local S = function(pos) if pos then return minetest.pos_to_string(pos) end end
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
Tube Library 2
|
Tube Library 2
|
||||||
==============
|
==============
|
||||||
|
|
||||||
Copyright (C) 2017-2018 Joachim Stolberg
|
Copyright (C) 2017-2020 Joachim Stolberg
|
||||||
|
|
||||||
LGPLv2.1+
|
LGPLv2.1+
|
||||||
See LICENSE.txt for more information
|
See LICENSE.txt for more information
|
||||||
|
Loading…
Reference in New Issue
Block a user