summaryrefslogtreecommitdiff
path: root/autoplace_tubes.lua
diff options
context:
space:
mode:
authorVanessa Ezekowitz <vanessaezekowitz@gmail.com>2013-12-10 21:18:29 -0500
committerVanessa Ezekowitz <vanessaezekowitz@gmail.com>2013-12-10 21:18:29 -0500
commite4a7af5858949ed786396abf0edd7f98c1e28941 (patch)
treed520d0fd7578cd648e5533cf816cade05a64062d /autoplace_tubes.lua
parentebfa12205a6c63204c005ea3798b45c2ac45c85d (diff)
downloadpipeworks-e4a7af5858949ed786396abf0edd7f98c1e28941.tar
pipeworks-e4a7af5858949ed786396abf0edd7f98c1e28941.tar.gz
pipeworks-e4a7af5858949ed786396abf0edd7f98c1e28941.tar.bz2
pipeworks-e4a7af5858949ed786396abf0edd7f98c1e28941.tar.xz
pipeworks-e4a7af5858949ed786396abf0edd7f98c1e28941.zip
Better way to catch that incoming nil, return a real value on the way out
Diffstat (limited to 'autoplace_tubes.lua')
-rw-r--r--autoplace_tubes.lua2
1 files changed, 2 insertions, 0 deletions
diff --git a/autoplace_tubes.lua b/autoplace_tubes.lua
index f7f7eb7..4bb31bc 100644
--- a/autoplace_tubes.lua
+++ b/autoplace_tubes.lua
@@ -28,6 +28,8 @@ end
--a function for determining which side of the node we are on
local function nodeside(node, tubedir)
+ if not tubedir or not node or not node.param2 then return "back" end
+
--get a vector pointing back
local backdir = minetest.facedir_to_dir(node.param2)