mirror of
https://github.com/joe7575/tubelib2.git
synced 2024-11-20 06:23:53 +01:00
not needed
This commit is contained in:
parent
0034e7ede5
commit
e3ae449a7b
29
design2.txt
29
design2.txt
@ -1,29 +0,0 @@
|
||||
function after_place_node(pos, node)
|
||||
# [s1][f1]----[n1] x [n2]-----[f2][s2]
|
||||
# s..secondary, f..far, n..near
|
||||
res,dir1,dir2 = update_nears(pos, node)
|
||||
if res:
|
||||
local fpos1,fdir1 = del_meta(pos, dir1) or repair_tube(pos, dir1) or pos,Turn180[dir1]
|
||||
local fpos2,fdir2 = del_meta(pos, dir2) or repair_tube(pos, dir2) or pos,Turn180[dir2]
|
||||
add_meta(fpos1, fpos2,fdir2)
|
||||
add_meta(fpos2, fpos1,fdir1)
|
||||
-- pos , data
|
||||
update_secondary_node(fpos1,fdir1, fpos2,fdir2)
|
||||
update_secondary_node(fpos2,fdir2, fpos1,fdir1)
|
||||
if mt.nodes[node.name].tubelib2 then mt.nodes[node.name].tl2(pos, dir):
|
||||
|
||||
|
||||
function after_dig_node(pos, oldnode):
|
||||
# [s1][f1]----[n1] x [n2]-----[f2][s2]
|
||||
# s..secondary, f..far, n..near
|
||||
res,dir1,dir2 = update_nears(pos, oldnode)
|
||||
if res:
|
||||
local fpos1,fdir1 = repair_tube(pos, dir1) or pos,Turn180[dir1]
|
||||
local fpos2,fdir2 = repair_tube(pos, dir2) or pos,Turn180[dir2]
|
||||
local npos1,ndir1 = get_pos(pos, dir1),Turn180[dir1]
|
||||
local npos2,ndir2 = get_pos(pos, dir2),Turn180[dir2]
|
||||
add_meta(fpos1, npos1,ndir1)
|
||||
add_meta(fpos2, npos1,ndir1)
|
||||
-- pos , data
|
||||
update_secondary_node(fpos1,fdir1, npos1,ndir1)
|
||||
update_secondary_node(fpos2,fdir2, npos2,ndir2)
|
Loading…
Reference in New Issue
Block a user