Cannot dig when has item in it

master
bas080 2013-08-08 16:34:07 +02:00
parent 26a75b887a
commit 4e98bb143d
1 changed files with 5 additions and 0 deletions

View File

@ -37,6 +37,11 @@ minetest.register_node("polymer:extruder", {
drawtype = "node",
description = "Polymer Extruder",
groups = {not_in_creative_inventory=1, snappy = 3,flammable=2, attached_node=1},
can_dig = function(pos,player)
local meta = minetest.get_meta(pos);
local inv = meta:get_inventory()
return inv:is_empty("input")
end,
on_construct = function(pos, node)
local meta = minetest.get_meta(pos)
local inv = meta:get_inventory()