mirror of
https://github.com/mt-mods/pipeworks.git
synced 2025-07-01 07:40:34 +02:00
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.
This commit is contained in:
@ -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()
|
||||
|
Reference in New Issue
Block a user