diff options
-rw-r--r-- | Overview.html | 2 | ||||
-rw-r--r-- | crafts.lua | 4 | ||||
-rw-r--r-- | img/CraftAutocrafter.png | bin | 11815 -> 8044 bytes | |||
-rw-r--r-- | item_transport.lua | 14 | ||||
-rw-r--r-- | tubes.lua | 7 |
5 files changed, 15 insertions, 12 deletions
diff --git a/Overview.html b/Overview.html index 8aa5d9f..8f93d2b 100644 --- a/Overview.html +++ b/Overview.html @@ -115,7 +115,7 @@ img { <p>Each row is associated with the color on the left side.</p>
<p>The far right contains an on/off button.</p>
<p>When on, only items that match those in the row associated with the color are allowed to move in that direction. If there are no items in the row, all items are allowed.</p>
- <p>When off, only items that do not match those in the row associated with the color are allowed to move in that direction. If there are no items in the row, no items are allowed.</p>
+ <p>When off, no items will get out through here.</p>
<p>Here's how you craft it:</p>
<img src="img/CraftMeseTube1.png">
<p>Or alternatively:</p>
@@ -95,9 +95,9 @@ minetest.register_craft( { minetest.register_craft( { output = "pipeworks:autocrafter 2", recipe = { - { "default:steel_ingot", "default:mese", "default:steel_ingot" }, + { "default:steel_ingot", "default:mese_crystal", "default:steel_ingot" }, { "homedecor:plastic_sheeting", "default:steel_ingot", "homedecor:plastic_sheeting" }, - { "default:steel_ingot", "default:mese", "default:steel_ingot" } + { "default:steel_ingot", "default:mese_crystal", "default:steel_ingot" } }, }) diff --git a/img/CraftAutocrafter.png b/img/CraftAutocrafter.png Binary files differindex dfa429b..8924f58 100644 --- a/img/CraftAutocrafter.png +++ b/img/CraftAutocrafter.png diff --git a/item_transport.lua b/item_transport.lua index 3a9943b..bb6f91b 100644 --- a/item_transport.lua +++ b/item_transport.lua @@ -197,6 +197,10 @@ function tube_item(pos, item) return obj end +local function roundpos(pos) + return {x=math.floor(pos.x+0.5),y=math.floor(pos.y+0.5),z=math.floor(pos.z+0.5)} +end + minetest.register_entity("pipeworks:tubed_item", { initial_properties = { hp_max = 1, @@ -278,7 +282,10 @@ minetest.register_entity("pipeworks:tubed_item", { end, on_step = function(self, dtime) - if self.start_pos then + if self.start_pos==nil then + local pos = self.object:getpos() + self.start_pos=roundpos(pos) + end local pos = self.object:getpos() local node = minetest.env:get_node(pos) local meta = minetest.env:get_meta(pos) @@ -356,13 +363,12 @@ minetest.register_entity("pipeworks:tubed_item", { self.object:setvelocity(velocity) end - end end }) -function addVect(pos,vect) -return {x=pos.x+vect.x,y=pos.y+vect.y,z=pos.z+vect.z} +local function addVect(pos,vect) + return {x=pos.x+vect.x,y=pos.y+vect.y,z=pos.z+vect.z} end adjlist={{x=0,y=0,z=1},{x=0,y=0,z=-1},{x=0,y=1,z=0},{x=0,y=-1,z=0},{x=1,y=0,z=0},{x=-1,y=0,z=0}} @@ -474,10 +474,7 @@ sand_inv_texture="pipeworks_sand_tube_inv.png" register_tube("pipeworks:sand_tube","Sand pneumatic tube segment",sand_plain_textures,sand_noctr_textures,sand_end_textures, sand_short_texture,sand_inv_texture, - {groups={sand_tube=1}, - tube={can_go=function(pos,node,velocity,stack) - return meseadjlist - end}}) + {groups={sand_tube=1}}) minetest.register_abm({nodenames={"group:sand_tube"},interval=1,chance=1, action=function(pos, node, active_object_count, active_object_count_wider) @@ -486,7 +483,7 @@ minetest.register_abm({nodenames={"group:sand_tube"},interval=1,chance=1, if object:get_luaentity().itemstring ~= "" then local titem=tube_item(pos,object:get_luaentity().itemstring) titem:get_luaentity().start_pos = {x=pos.x,y=pos.y-1,z=pos.z} - titem:setvelocity({x=0,y=1,z=0}) + titem:setvelocity({x=0.01,y=1,z=-0.01}) titem:setacceleration({x=0, y=0, z=0}) end object:get_luaentity().itemstring = "" |