summaryrefslogtreecommitdiff
path: root/autoplace.lua
diff options
context:
space:
mode:
authorNovatux <nathanael.courant@laposte.net>2013-01-19 15:37:27 +0100
committerNovatux <nathanael.courant@laposte.net>2013-01-19 15:37:27 +0100
commitb3fcf6734fe9c48c7d719612f29dabd6846dcc19 (patch)
tree17fd46591bc0914a5e3737411b508a417ad22a4c /autoplace.lua
parent4ecb7475703ccfd82caf0612c2d2189b6ad320ce (diff)
downloadpipeworks-b3fcf6734fe9c48c7d719612f29dabd6846dcc19.tar
pipeworks-b3fcf6734fe9c48c7d719612f29dabd6846dcc19.tar.gz
pipeworks-b3fcf6734fe9c48c7d719612f29dabd6846dcc19.tar.bz2
pipeworks-b3fcf6734fe9c48c7d719612f29dabd6846dcc19.tar.xz
pipeworks-b3fcf6734fe9c48c7d719612f29dabd6846dcc19.zip
Added autocrafter.
Fixed a bug where items in mese tubes disappeared whan placing or removing a tube next to it.
Diffstat (limited to 'autoplace.lua')
-rw-r--r--autoplace.lua7
1 files changed, 6 insertions, 1 deletions
diff --git a/autoplace.lua b/autoplace.lua
index 2b297f2..84c6fde 100644
--- a/autoplace.lua
+++ b/autoplace.lua
@@ -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