mirror of
https://github.com/joe7575/tubelib2.git
synced 2024-11-28 10:23:45 +01:00
v1.4 optional param tubetype added
This commit is contained in:
parent
a0bf800dba
commit
ba57e8679f
@ -75,3 +75,4 @@ Textures: CC0
|
||||
- 2019-03-02 v1.1 * API function 'switch_tube_line' added, secondary node placement bugfix
|
||||
- 2019-04-18 v1.2 * 'force_to_use_tubes' added
|
||||
- 2019-05-01 v1.3 * API function 'compatible_node' added
|
||||
- 2019-05-09 v1.4 * Attribute 'tube_type' added
|
||||
|
@ -63,22 +63,11 @@ local Dir6dToVector = {[0] =
|
||||
{x=0, y=1, z=0},
|
||||
}
|
||||
|
||||
local VectorToDir6d = {
|
||||
[{x=0, y=0, z=1}] = 1,
|
||||
[{x=1, y=0, z=0}] = 2,
|
||||
[{x=0, y=0, z=-1}] = 3,
|
||||
[{x=-1, y=0, z=0}] = 4,
|
||||
[{x=0, y=-1, z=0}] = 5,
|
||||
[{x=0, y=1, z=0}] = 6,
|
||||
}
|
||||
|
||||
|
||||
tubelib2.Tube = Tube
|
||||
tubelib2.Turn180Deg = Turn180Deg
|
||||
tubelib2.DirToParam2 = DirToParam2
|
||||
tubelib2.Param2ToDir = Param2ToDir
|
||||
tubelib2.Dir6dToVector = Dir6dToVector
|
||||
tubelib2.VectorToDir6d = VectorToDir6d
|
||||
|
||||
|
||||
--
|
||||
|
@ -13,7 +13,7 @@
|
||||
]]--
|
||||
|
||||
-- Version for compatibility checks, see readme.md/history
|
||||
tubelib2.version = 1.3
|
||||
tubelib2.version = 1.4
|
||||
|
||||
-- for lazy programmers
|
||||
local S = function(pos) if pos then return minetest.pos_to_string(pos) end end
|
||||
@ -148,6 +148,7 @@ function Tube:new(attr)
|
||||
show_infotext = attr.show_infotext or false,
|
||||
force_to_use_tubes = attr.force_to_use_tubes or false,
|
||||
clbk_after_place_tube = attr.after_place_tube,
|
||||
tube_type = attr.tube_type or "unknown",
|
||||
pairingList = {}, -- teleporting nodes
|
||||
connCache = {}, -- connection cache {pos1 = {dir1 = {pos2 = pos2, dir2 = dir2},...}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user