forked from mtcontrib/pipeworks
Merge pull request #44 from Novatux/simple
Add option to disable cyclic behaviour
This commit is contained in:
commit
9a3a9616f6
1
init.lua
1
init.lua
|
@ -14,6 +14,7 @@
|
||||||
|
|
||||||
minetest.register_alias("pipeworks:pipe", "pipeworks:pipe_110000_empty")
|
minetest.register_alias("pipeworks:pipe", "pipeworks:pipe_110000_empty")
|
||||||
local DEBUG = false
|
local DEBUG = false
|
||||||
|
local CYCLIC = true
|
||||||
|
|
||||||
pipeworks_liquid_texture = "default_water.png"
|
pipeworks_liquid_texture = "default_water.png"
|
||||||
|
|
||||||
|
|
|
@ -465,7 +465,9 @@ function go_next(pos,velocity,stack)
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
until false
|
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.x=tubes[n].vect.x*vel.speed
|
||||||
velocity.y=tubes[n].vect.y*vel.speed
|
velocity.y=tubes[n].vect.y*vel.speed
|
||||||
velocity.z=tubes[n].vect.z*vel.speed
|
velocity.z=tubes[n].vect.z*vel.speed
|
||||||
|
@ -484,6 +486,9 @@ function go_next(pos,velocity,stack)
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
until false
|
until false
|
||||||
|
if CYCLIC then
|
||||||
|
meta:set_int("tubedir",n)
|
||||||
|
end
|
||||||
velocity.x=chests[n].vect.x*speed
|
velocity.x=chests[n].vect.x*speed
|
||||||
velocity.y=chests[n].vect.y*speed
|
velocity.y=chests[n].vect.y*speed
|
||||||
velocity.z=chests[n].vect.z*speed
|
velocity.z=chests[n].vect.z*speed
|
||||||
|
|
Loading…
Reference in New Issue
Block a user