diff options
author | Vanessa Ezekowitz <vanessaezekowitz@gmail.com> | 2013-12-10 21:18:29 -0500 |
---|---|---|
committer | Vanessa Ezekowitz <vanessaezekowitz@gmail.com> | 2013-12-10 21:18:29 -0500 |
commit | e4a7af5858949ed786396abf0edd7f98c1e28941 (patch) | |
tree | d520d0fd7578cd648e5533cf816cade05a64062d | |
parent | ebfa12205a6c63204c005ea3798b45c2ac45c85d (diff) | |
download | pipeworks-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
-rw-r--r-- | autoplace_tubes.lua | 2 |
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) |