projects
/
zefram
/
minetest
/
pipeworks.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
33e3d76
)
Fix repartition of teleport tubes not being random.
author
Novatux
<nathanael.courant@laposte.net>
Sat, 13 Apr 2013 09:47:50 +0000
(11:47 +0200)
committer
Novatux
<nathanael.courant@laposte.net>
Sat, 13 Apr 2013 09:47:50 +0000
(11:47 +0200)
teleport_tube.lua
patch
|
blob
|
history
diff --git
a/teleport_tube.lua
b/teleport_tube.lua
index ac1a613d1b025ef7106797d051802f62a8763edf..c1629528464f04f6dcd57ad6e129f6f301e451b1 100644
(file)
--- a/
teleport_tube.lua
+++ b/
teleport_tube.lua
@@
-76,9
+76,10
@@
register_tube("pipeworks:teleport_tube","Teleporter pneumatic tube segment",tele
channel=meta:get_string("channel")
goto=get_tubes_in_file(pos,channel)
if goto[1]==nil then return {} end
- pos.x=goto[1].x
- pos.y=goto[1].y
- pos.z=goto[1].z
+ d=math.random(1,#goto)
+ pos.x=goto[d].x
+ pos.y=goto[d].y
+ pos.z=goto[d].z
return meseadjlist
end},
on_construct = function(pos)