local empty_cap = {
    dig_immediate = {
        maxlevel = 0,
        uses = 0,
    },
}

core.register_on_mods_loaded(function()
    if not core.get_modpath("aom_vars") then return false end
    if aom_vars.prevent_digging then
        core.override_item("", {
            tool_capabilities = {
                groupcaps = empty_cap,
            }
        })
        for index, value in pairs(core.registered_tools) do
            if value.tool_capabilities ~= nil then
                core.override_item(index, {
                    tool_capabilities = {
                        groupcaps = empty_cap,
                    }
                })
            end
        end
    end
end)
