summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVanessa Ezekowitz <vanessaezekowitz@gmail.com>2013-06-22 15:08:05 -0400
committerVanessa Ezekowitz <vanessaezekowitz@gmail.com>2013-06-22 15:08:05 -0400
commit00e6d148d5cc1b8f939d779c88727f66f00ce6f9 (patch)
treea90688b08af7ca633bf5a15e4329ff17163005b5
parent9a42a5f18b5e03340e9ec756eeedcf2dd6aae5b3 (diff)
downloadpipeworks-00e6d148d5cc1b8f939d779c88727f66f00ce6f9.tar
pipeworks-00e6d148d5cc1b8f939d779c88727f66f00ce6f9.tar.gz
pipeworks-00e6d148d5cc1b8f939d779c88727f66f00ce6f9.tar.bz2
pipeworks-00e6d148d5cc1b8f939d779c88727f66f00ce6f9.tar.xz
pipeworks-00e6d148d5cc1b8f939d779c88727f66f00ce6f9.zip
minor tweak to allow the register_tube() function to use any arbitrary
namespace for the tube instead of forcing it to be pipeworks:
-rw-r--r--tubes.lua7
1 files changed, 5 insertions, 2 deletions
diff --git a/tubes.lua b/tubes.lua
index 4bd1d77..018da3d 100644
--- a/tubes.lua
+++ b/tubes.lua
@@ -249,8 +249,11 @@ for zp = 0, 1 do
nodedef[key]=value
end
end
-
- minetest.register_node(name.."_"..tname, nodedef)
+
+ local prefix=":"
+ if string.find(name, "pipeworks:") then prefix = "" end
+
+ minetest.register_node(prefix..name.."_"..tname, nodedef)
end
end