forked from mtcontrib/pipeworks
Fix the teleport tube in the latest mt.
This commit is contained in:
parent
ea602a4af0
commit
93fb11791c
|
@ -74,12 +74,12 @@ register_tube("pipeworks:teleport_tube","Teleporter pneumatic tube segment",tele
|
||||||
velocity.z=0
|
velocity.z=0
|
||||||
local meta = minetest.env:get_meta(pos)
|
local meta = minetest.env:get_meta(pos)
|
||||||
channel=meta:get_string("channel")
|
channel=meta:get_string("channel")
|
||||||
goto=get_tubes_in_file(pos,channel)
|
local target=get_tubes_in_file(pos,channel)
|
||||||
if goto[1]==nil then return {} end
|
if target[1]==nil then return {} end
|
||||||
d=math.random(1,#goto)
|
d=math.random(1,#target)
|
||||||
pos.x=goto[d].x
|
pos.x=target[d].x
|
||||||
pos.y=goto[d].y
|
pos.y=target[d].y
|
||||||
pos.z=goto[d].z
|
pos.z=target[d].z
|
||||||
return meseadjlist
|
return meseadjlist
|
||||||
end},
|
end},
|
||||||
on_construct = function(pos)
|
on_construct = function(pos)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user