1
0
mirror of https://github.com/mt-mods/pipeworks.git synced 2025-07-03 08:40:34 +02:00

Added autocrafter.

Fixed a bug where items in mese tubes disappeared whan placing or removing a tube next to it.
This commit is contained in:
Novatux
2013-01-19 15:37:27 +01:00
parent 4ecb747570
commit b3fcf6734f
4 changed files with 82 additions and 2 deletions

View File

@ -87,7 +87,12 @@ function tube_autoroute(pos)
nsurround = pxm..pxp..pym..pyp..pzm..pzp
if is_tube(nctr.name) then
minetest.env:add_node(pos, { name = string.sub(nctr.name,1,-7)..nsurround })
local meta=minetest.env:get_meta(pos)
local meta0=meta:to_table()
nctr.name=string.sub(nctr.name,1,-7)..nsurround
minetest.env:add_node(pos, nctr)
local meta=minetest.env:get_meta(pos)
meta:from_table(meta0)
end
end