projects
/
zefram
/
minetest
/
pipeworks.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e4a7af5
)
More sanity checks on the nodeside() function, courtesy ShadowNinja
author
Vanessa Ezekowitz
<vanessaezekowitz@gmail.com>
Wed, 11 Dec 2013 02:39:47 +0000
(21:39 -0500)
committer
Vanessa Ezekowitz
<vanessaezekowitz@gmail.com>
Wed, 11 Dec 2013 02:41:15 +0000
(21:41 -0500)
autoplace_tubes.lua
patch
|
blob
|
history
diff --git
a/autoplace_tubes.lua
b/autoplace_tubes.lua
index 4bb31bc3e4d4db31e91de360004d0e3542a147c2..518caf8320db4f4ea4597586c0dad5364641b3ec 100644
(file)
--- a/
autoplace_tubes.lua
+++ b/
autoplace_tubes.lua
@@
-28,7
+28,11
@@
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
+ if not tubedir or
+ not node or
+ not (type(node.param2) == "number" and node.param2 > 0 and node.param2 < 23) then
+ return "back"
+ end
--get a vector pointing back
local backdir = minetest.facedir_to_dir(node.param2)