summaryrefslogtreecommitdiff
path: root/tubes.lua
diff options
context:
space:
mode:
authorZefram <zefram@fysh.org>2014-08-14 21:59:15 +0100
committerNovatux <nathanael.courant@laposte.net>2014-08-15 13:24:52 +0200
commit7915e7f51e8aef77b52c6ad94c5e709456d4958d (patch)
tree7ef9f430b27d26419f3e538fbf8ed113521f2be8 /tubes.lua
parentb77146f29cd1456dff4a3b9e023e6067e9580318 (diff)
downloadpipeworks-7915e7f51e8aef77b52c6ad94c5e709456d4958d.tar
pipeworks-7915e7f51e8aef77b52c6ad94c5e709456d4958d.tar.gz
pipeworks-7915e7f51e8aef77b52c6ad94c5e709456d4958d.tar.bz2
pipeworks-7915e7f51e8aef77b52c6ad94c5e709456d4958d.tar.xz
pipeworks-7915e7f51e8aef77b52c6ad94c5e709456d4958d.zip
Rename tube_item() to tube_inject_item()
The new function has no API compatibility with the old one, so give it a different name to avoid confusion among caller mods, which need to change their usage. Have a function under the old name that outputs a helpful error message.
Diffstat (limited to 'tubes.lua')
-rwxr-xr-xtubes.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/tubes.lua b/tubes.lua
index 10a7c64..e7e3579 100755
--- a/tubes.lua
+++ b/tubes.lua
@@ -496,7 +496,7 @@ if pipeworks.enable_sand_tube then
for _, object in ipairs(minetest.get_objects_inside_radius(pos, 2)) do
if not object:is_player() and object:get_luaentity() and object:get_luaentity().name == "__builtin:item" then
if object:get_luaentity().itemstring ~= "" then
- pipeworks.tube_item(pos, pos, vector.new(0, 0, 0), object:get_luaentity().itemstring)
+ pipeworks.tube_inject_item(pos, pos, vector.new(0, 0, 0), object:get_luaentity().itemstring)
end
object:get_luaentity().itemstring = ""
object:remove()
@@ -556,7 +556,7 @@ if pipeworks.enable_mese_sand_tube then
for _,object in ipairs(get_objects_with_square_radius(pos, minetest.env:get_meta(pos):get_int("dist"))) do
if not object:is_player() and object:get_luaentity() and object:get_luaentity().name == "__builtin:item" then
if object:get_luaentity().itemstring ~= "" then
- pipeworks.tube_item(pos, pos, vector.new(0, 0, 0), object:get_luaentity().itemstring)
+ pipeworks.tube_inject_item(pos, pos, vector.new(0, 0, 0), object:get_luaentity().itemstring)
end
object:get_luaentity().itemstring = ""
object:remove()