summaryrefslogtreecommitdiff
path: root/tubes.lua
diff options
context:
space:
mode:
authorTim <t4im@users.noreply.github.com>2014-12-27 22:14:33 +0100
committerTim <t4im@users.noreply.github.com>2014-12-27 22:14:33 +0100
commit6f16dd24c2dcd1de1dca87e9656498ea34331628 (patch)
treeb47a9ef418c3b53ffbe1444e2620f84ebcc35b28 /tubes.lua
parent614f6f4da198ca2127c4e7c29c0f55fcac0f3be6 (diff)
downloadpipeworks-6f16dd24c2dcd1de1dca87e9656498ea34331628.tar
pipeworks-6f16dd24c2dcd1de1dca87e9656498ea34331628.tar.gz
pipeworks-6f16dd24c2dcd1de1dca87e9656498ea34331628.tar.bz2
pipeworks-6f16dd24c2dcd1de1dca87e9656498ea34331628.tar.xz
pipeworks-6f16dd24c2dcd1de1dca87e9656498ea34331628.zip
allow sorting tubes to be dug, despite virtual items in the inventories
Diffstat (limited to 'tubes.lua')
-rwxr-xr-xtubes.lua6
1 files changed, 2 insertions, 4 deletions
diff --git a/tubes.lua b/tubes.lua
index 6ac6da6..149e78e 100755
--- a/tubes.lua
+++ b/tubes.lua
@@ -317,10 +317,8 @@ if pipeworks.enable_mese_tube then
update_formspec(pos)
end,
can_dig = function(pos, player)
- local meta = minetest.get_meta(pos)
- local inv = meta:get_inventory()
- return (inv:is_empty("line1") and inv:is_empty("line2") and inv:is_empty("line3") and
- inv:is_empty("line4") and inv:is_empty("line5") and inv:is_empty("line6"))
+ update_formspec(pos) -- so non-virtual items would be dropped for old tubes
+ return true
end,
allow_metadata_inventory_put = function(pos, listname, index, stack, player)
update_formspec(pos) -- For old tubes