mirror of
https://github.com/mt-mods/pipeworks.git
synced 2024-11-09 17:03:58 +01:00
Fix repartition of teleport tubes not being random.
This commit is contained in:
parent
33e3d76cec
commit
9001f0c293
@ -76,9 +76,10 @@ register_tube("pipeworks:teleport_tube","Teleporter pneumatic tube segment",tele
|
|||||||
channel=meta:get_string("channel")
|
channel=meta:get_string("channel")
|
||||||
goto=get_tubes_in_file(pos,channel)
|
goto=get_tubes_in_file(pos,channel)
|
||||||
if goto[1]==nil then return {} end
|
if goto[1]==nil then return {} end
|
||||||
pos.x=goto[1].x
|
d=math.random(1,#goto)
|
||||||
pos.y=goto[1].y
|
pos.x=goto[d].x
|
||||||
pos.z=goto[1].z
|
pos.y=goto[d].y
|
||||||
|
pos.z=goto[d].z
|
||||||
return meseadjlist
|
return meseadjlist
|
||||||
end},
|
end},
|
||||||
on_construct = function(pos)
|
on_construct = function(pos)
|
||||||
|
Loading…
Reference in New Issue
Block a user