at top of script, add
shovel_whitelist = {1111, 2222, 3333} -- itemIds that will be ignored, and shovel can pass through
above
local ground = tile:getGround()
add
local topVisible = tile:getTopVisibleThing(player)
if not topVisible:isItem() then
return false
end
if not...