summaryrefslogtreecommitdiff
path: root/item_transport.lua
diff options
context:
space:
mode:
authorNovatux <nathanael.courant@laposte.net>2013-06-28 15:16:28 +0200
committerNovatux <nathanael.courant@laposte.net>2013-06-28 15:16:28 +0200
commit89be094a1ef6a53a5f2648e1dce9151c42bcd27d (patch)
tree9a6eb692de2b082b7cafc0f5d4608bb37253e935 /item_transport.lua
parent6ca5da4c3acc6fea00deb05df3253627183c0fb3 (diff)
downloadpipeworks-89be094a1ef6a53a5f2648e1dce9151c42bcd27d.tar
pipeworks-89be094a1ef6a53a5f2648e1dce9151c42bcd27d.tar.gz
pipeworks-89be094a1ef6a53a5f2648e1dce9151c42bcd27d.tar.bz2
pipeworks-89be094a1ef6a53a5f2648e1dce9151c42bcd27d.tar.xz
pipeworks-89be094a1ef6a53a5f2648e1dce9151c42bcd27d.zip
Add option to disable cyclic behaviour
Diffstat (limited to 'item_transport.lua')
-rw-r--r--item_transport.lua7
1 files changed, 6 insertions, 1 deletions
diff --git a/item_transport.lua b/item_transport.lua
index 12a177c..b733d32 100644
--- a/item_transport.lua
+++ b/item_transport.lua
@@ -465,7 +465,9 @@ function go_next(pos,velocity,stack)
break
end
until false
- meta:set_int("tubedir",n)
+ if CYCLIC then
+ meta:set_int("tubedir",n)
+ end
velocity.x=tubes[n].vect.x*vel.speed
velocity.y=tubes[n].vect.y*vel.speed
velocity.z=tubes[n].vect.z*vel.speed
@@ -484,6 +486,9 @@ function go_next(pos,velocity,stack)
break
end
until false
+ if CYCLIC then
+ meta:set_int("tubedir",n)
+ end
velocity.x=chests[n].vect.x*speed
velocity.y=chests[n].vect.y*speed
velocity.z=chests[n].vect.z*speed