summaryrefslogtreecommitdiff
path: root/item_transport.lua
diff options
context:
space:
mode:
authorVanessa Ezekowitz <vanessaezekowitz@gmail.com>2013-12-15 14:41:03 -0500
committerVanessa Ezekowitz <vanessaezekowitz@gmail.com>2013-12-15 14:41:03 -0500
commita4a74413c0037b4729e4c728f2b32e91395b7e60 (patch)
tree114635b698f8777394e1e67f6ba6210666dd3227 /item_transport.lua
parent6785ba39f45893d8f98f9ee5c82b66cdc2959c39 (diff)
tube_item has to be global. confined it to pipeworks.{} table.
Diffstat (limited to 'item_transport.lua')
-rw-r--r--item_transport.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/item_transport.lua b/item_transport.lua
index ab961d9..6b2b494 100644
--- a/item_transport.lua
+++ b/item_transport.lua
@@ -29,7 +29,7 @@ local fakePlayer = {
-- perhaps a custom metaclass that errors specially when fakePlayer.<property> is not found?
}
-local function tube_item(pos, item)
+function pipeworks.tube_item(pos, item)
-- Take item in any format
local stack = ItemStack(item)
local obj = minetest.add_entity(pos, "pipeworks:tubed_item")
@@ -73,7 +73,7 @@ local function grabAndFire(frominv,frominvname,frompos,fromnode,sname,tube,idef,
idef.on_metadata_inventory_take(frompos, "main", spos, item, fakePlayer)
end
end
- local item1=tube_item(frompos,item)
+ local item1=pipeworks.tube_item(frompos,item)
item1:get_luaentity().start_pos = frompos
item1:setvelocity(dir)
item1:setacceleration({x=0, y=0, z=0})