technic = technic or {}
+technic.tube_inject_item = pipeworks.tube_inject_item or function (pos, start_pos, velocity, item)
+ local tubed = pipeworks.tube_item(vector.new(pos), item)
+ tubed:get_luaentity().start_pos = vector.new(start_pos)
+ tubed:setvelocity(velocity)
+ tubed:setacceleration(vector.new(0, 0, 0))
+end
+
local load_start = os.clock()
local modpath = minetest.get_modpath("technic")
technic.modpath = modpath
local function send_items(items, pos, node)
for _, item in pairs(items) do
- pipeworks.tube_item(pos, pos, vector.new(0, 1, 0), item)
+ technic.tube_inject_item(pos, pos, vector.new(0, 1, 0), item)
end
end
local item0=stack:to_table()
if item0 then
item0["count"] = "1"
- pipeworks.tube_item(pos, pos, vector.new(0, -1, 0), item0)
+ technic.tube_inject_item(pos, pos, vector.new(0, -1, 0), item0)
stack:take_item(1)
inv:set_stack("main", i, stack)
return
if stack then
local item0=stack:to_table()
if item0 then
- pipeworks.tube_item(pos, pos, vector.new(0, -1, 0), item0)
+ technic.tube_inject_item(pos, pos, vector.new(0, -1, 0), item0)
stack:clear()
inv:set_stack("main", i, stack)
return
local item0 = stack:to_table()
if item0 then
item0["count"] = "1"
- pipeworks.tube_item(pos, pos, vector.new(x_velocity, 0, z_velocity), item0)
+ technic.tube_inject_item(pos, pos, vector.new(x_velocity, 0, z_velocity), item0)
stack:take_item(1)
inv:set_stack(output_name, i, stack)
return