Need to add this function:
function onUseShovel(player, item, fromPosition, target, toPosition, isHotkey)
local targetId, targetActionId = target.itemid, target.actionid
if isInArray(holes, targetId) then
target:transform(targetId + 1)
target:decay()
elseif...