summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNovatux <nathanael.courant@laposte.net>2014-08-14 21:29:56 +0200
committerNovatux <nathanael.courant@laposte.net>2014-08-14 21:29:56 +0200
commitbaf7f6166595218fed50f0f34209ef4deec21d41 (patch)
treef5446a4f89cb2bf8f310dce70472dd17d477bbef
parent3b16a2858f83140601abfc05515529d0bf60ddfa (diff)
Compatibility with latest pipeworks
-rw-r--r--technic/machines/HV/quarry.lua5
-rw-r--r--technic/machines/other/injector.lua14
-rw-r--r--technic/machines/register/common.lua5
3 files changed, 6 insertions, 18 deletions
diff --git a/technic/machines/HV/quarry.lua b/technic/machines/HV/quarry.lua
index 628c443..d75a9e3 100644
--- a/technic/machines/HV/quarry.lua
+++ b/technic/machines/HV/quarry.lua
@@ -119,10 +119,7 @@ end
local function send_items(items, pos, node)
for _, item in pairs(items) do
- local tube_item = pipeworks.tube_item(vector.new(pos), item)
- tube_item:get_luaentity().start_pos = vector.new(pos)
- tube_item:setvelocity(vector.new(0, 1, 0))
- tube_item:setacceleration({x=0, y=0, z=0})
+ pipeworks.tube_item(pos, pos, vector.new(0, 1, 0), item)
end
end
diff --git a/technic/machines/other/injector.lua b/technic/machines/other/injector.lua
index 11c5455..485974c 100644
--- a/technic/machines/other/injector.lua
+++ b/technic/machines/other/injector.lua
@@ -12,12 +12,9 @@ local function inject_items (pos)
if stack then
local item0=stack:to_table()
if item0 then
- item0["count"]="1"
- local item1=pipeworks.tube_item({x=pos.x,y=pos.y,z=pos.z},item0)
- item1:get_luaentity().start_pos = {x=pos.x,y=pos.y,z=pos.z}
- item1:setvelocity({x=0, y=-1, z=0})
- item1:setacceleration({x=0, y=0, z=0})
- stack:take_item(1);
+ item0["count"] = "1"
+ pipeworks.tube_item(pos, pos, vector.new(0, -1, 0), item0)
+ stack:take_item(1)
inv:set_stack("main", i, stack)
return
end
@@ -31,10 +28,7 @@ local function inject_items (pos)
if stack then
local item0=stack:to_table()
if item0 then
- local item1=pipeworks.tube_item({x=pos.x,y=pos.y,z=pos.z},item0)
- item1:get_luaentity().start_pos = {x=pos.x,y=pos.y,z=pos.z}
- item1:setvelocity({x=0, y=-1, z=0})
- item1:setacceleration({x=0, y=0, z=0})
+ pipeworks.tube_item(pos, pos, vector.new(0, -1, 0), item0)
stack:clear()
inv:set_stack("main", i, stack)
return
diff --git a/technic/machines/register/common.lua b/technic/machines/register/common.lua
index a3702ab..366009c 100644
--- a/technic/machines/register/common.lua
+++ b/technic/machines/register/common.lua
@@ -52,10 +52,7 @@ function technic.send_items(pos, x_velocity, z_velocity, output_name)
local item0 = stack:to_table()
if item0 then
item0["count"] = "1"
- local item1 = pipeworks.tube_item({x=pos.x, y=pos.y, z=pos.z}, item0)
- item1:get_luaentity().start_pos = {x=pos.x, y=pos.y, z=pos.z}
- item1:setvelocity({x=x_velocity, y=0, z=z_velocity})
- item1:setacceleration({x=0, y=0, z=0})
+ pipeworks.tube_item(pos, pos, vector.new(x_velocity, 0, z_velocity), item0)
stack:take_item(1)
inv:set_stack(output_name, i, stack)
return