summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVanessaE <vanessaezekowitz@gmail.com>2013-06-28 06:18:23 -0700
committerVanessaE <vanessaezekowitz@gmail.com>2013-06-28 06:18:23 -0700
commit9a3a9616f6a6c8993ec127fc0a9a27d47ef0d0aa (patch)
treebbee2412ea919d9b899d2d6c1ddeca45b34c855e
parent5aceb445c4402cd9961a7d5e8506fec8041a8034 (diff)
parent89be094a1ef6a53a5f2648e1dce9151c42bcd27d (diff)
downloadpipeworks-9a3a9616f6a6c8993ec127fc0a9a27d47ef0d0aa.tar
pipeworks-9a3a9616f6a6c8993ec127fc0a9a27d47ef0d0aa.tar.gz
pipeworks-9a3a9616f6a6c8993ec127fc0a9a27d47ef0d0aa.tar.bz2
pipeworks-9a3a9616f6a6c8993ec127fc0a9a27d47ef0d0aa.tar.xz
pipeworks-9a3a9616f6a6c8993ec127fc0a9a27d47ef0d0aa.zip
Merge pull request #44 from Novatux/simple
Add option to disable cyclic behaviour
-rw-r--r--init.lua1
-rw-r--r--item_transport.lua7
2 files changed, 7 insertions, 1 deletions
diff --git a/init.lua b/init.lua
index d943424..7136d4b 100644
--- a/init.lua
+++ b/init.lua
@@ -14,6 +14,7 @@
minetest.register_alias("pipeworks:pipe", "pipeworks:pipe_110000_empty")
local DEBUG = false
+local CYCLIC = true
pipeworks_liquid_texture = "default_water.png"
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