From 1d0687556a52891aeadc0e8d9a58e44c53cb826b Mon Sep 17 00:00:00 2001 From: Zefram <zefram@fysh.org> Date: Fri, 15 Aug 2014 13:25:46 +0200 Subject: [PATCH] Fix music player's sound management --- technic/machines/other/injector.lua | 14 ++++---------- 1 files changed, 4 insertions(+), 10 deletions(-) diff --git a/technic/machines/other/injector.lua b/technic/machines/other/injector.lua index 11c5455..eb63987 100644 --- a/technic/machines/other/injector.lua +++ b/technic/machines/other/injector.lua @@ -12,12 +12,9 @@ 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" + technic.tube_inject_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 @@ 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}) + technic.tube_inject_item(pos, pos, vector.new(0, -1, 0), item0) stack:clear() inv:set_stack("main", i, stack) return -- Gitblit v1.8.0