mirror of
https://github.com/joe7575/tubelib2.git
synced 2024-11-28 10:23:45 +01:00
cleanup
This commit is contained in:
parent
6621735f22
commit
5f6e6d4e44
@ -167,7 +167,8 @@ end
|
||||
function Tube:update_secondary_node(fpos,fdir, npos,ndir)
|
||||
-- [s]<-[n]----[f]->[s]
|
||||
local fpos2, node = self:get_node(fpos, fdir)
|
||||
if minetest.registered_nodes[node.name].tubelib2_on_update then
|
||||
if minetest.registered_nodes[node.name] and
|
||||
minetest.registered_nodes[node.name].tubelib2_on_update then
|
||||
local npos2 = self:get_pos(npos, ndir)
|
||||
if vector.equals(npos2, fpos2) then -- last tube removed?
|
||||
npos2,ndir = nil,nil -- used to delete the data base
|
||||
|
@ -152,7 +152,6 @@ function Tube:connected(pos, dir)
|
||||
local node = get_node_lvm(npos)
|
||||
return self.primary_node_names[node.name]
|
||||
or self.secondary_node_names[node.name]
|
||||
or self.legacy_node_names[node.name]
|
||||
end
|
||||
|
||||
-- Determine dirs via surrounding nodes
|
||||
|
@ -47,7 +47,6 @@ function Tube:new(attr)
|
||||
max_tube_length = attr.max_tube_length or 1000,
|
||||
primary_node_names = Tbl(attr.primary_node_names or {}),
|
||||
secondary_node_names = Tbl(attr.secondary_node_names or {}),
|
||||
legacy_node_names = Tbl(attr.legacy_node_names or {}),
|
||||
show_infotext = attr.show_infotext or false,
|
||||
clbk_after_place_tube = attr.after_place_tube,
|
||||
pairingList = {}, -- teleporting nodes
|
||||
@ -182,9 +181,6 @@ function Tube:pairing(pos, channel)
|
||||
|
||||
local tube_dir1 = self:store_teleport_data(pos, peer_pos)
|
||||
local tube_dir2 = self:store_teleport_data(peer_pos, pos)
|
||||
|
||||
--self:delete_tube_meta_data(pos, tube_dir1)
|
||||
--self:delete_tube_meta_data(peer_pos, tube_dir2)
|
||||
local fpos1,fdir1 = self:repair_tube_line(pos, tube_dir1)
|
||||
local fpos2,fdir2 = self:repair_tube_line(peer_pos, tube_dir2)
|
||||
self:add_meta(fpos1, fpos2,fdir2)
|
||||
|
Loading…
Reference in New Issue
Block a user