summaryrefslogtreecommitdiff
path: root/pipes.lua
diff options
context:
space:
mode:
authorVanessa Ezekowitz <vanessaezekowitz@gmail.com>2017-10-26 04:11:30 -0400
committerVanessa Ezekowitz <vanessaezekowitz@gmail.com>2017-10-26 04:11:30 -0400
commit8817918a53854882b57683a00350baca643ec1b4 (patch)
treea0ad61b5a1b458a6dd14b0eb2d33e036a7273d2b /pipes.lua
parentdfc09f3acc45c1fffc004f69ca279462d9d4b4d9 (diff)
downloadpipeworks-8817918a53854882b57683a00350baca643ec1b4.tar
pipeworks-8817918a53854882b57683a00350baca643ec1b4.tar.gz
pipeworks-8817918a53854882b57683a00350baca643ec1b4.tar.bz2
pipeworks-8817918a53854882b57683a00350baca643ec1b4.tar.xz
pipeworks-8817918a53854882b57683a00350baca643ec1b4.zip
add low-poly mode
to enable, set pipeworks_enable_lowpoly = true in minetest.conf
Diffstat (limited to 'pipes.lua')
-rw-r--r--pipes.lua7
1 files changed, 5 insertions, 2 deletions
diff --git a/pipes.lua b/pipes.lua
index 602daab..01efef3 100644
--- a/pipes.lua
+++ b/pipes.lua
@@ -7,6 +7,9 @@ local pipes_full_nodenames = {}
local new_flow_logic_register = pipeworks.flowables.register
+local polys = ""
+if pipeworks.enable_lowpoly then polys = "_lowpoly" end
+
local vti = {4, 3, 2, 1, 6, 5}
local cconnects = {{}, {1}, {1, 2}, {1, 3}, {1, 3, 5}, {1, 2, 3}, {1, 2, 3, 5}, {1, 2, 3, 4}, {1, 2, 3, 4, 5}, {1, 2, 3, 4, 5, 6}}
for index, connects in ipairs(cconnects) do
@@ -49,10 +52,10 @@ for index, connects in ipairs(cconnects) do
outimg_l = { "pipeworks_pipe_3_loaded.png" }
end
- local mesh = "pipeworks_pipe_"..index..".obj"
+ local mesh = "pipeworks_pipe_"..index..polys..".obj"
if index == 1 then
- mesh = "pipeworks_pipe_3.obj"
+ mesh = "pipeworks_pipe_3"..polys..".obj"
end
minetest.register_node("pipeworks:pipe_"..index.."_empty", {