Improve detection of unbreakable blocks.

This commit is contained in:
Wuzzy 2016-08-29 13:37:50 +02:00
parent a961539931
commit 0becb68bf2

View File

@ -439,14 +439,16 @@ doc.new_category("nodes", {
formstring = formstring .. "\n"
--[[ Check if there are no groups at all, helps for finding undiggable nodes,
-- but this approach might miss some of these; still better than nothing. ]]
-- Mining groups
if data.def.pointable ~= false and (data.def.liquid_type == "none" or data.def.liquid_type == nil) then
-- Check if there are no mining groups at all
local nogroups = true
for k,v in pairs(data.def.groups) do
-- If this is reached once, we know the groups table is not empty
for groupname,_ in pairs(mininggroups) do
if data.def.groups[groupname] ~= nil or groupname == dig_immediate then
nogroups = false
break
end
end
-- dig_immediate
if data.def.drop ~= "" then
if data.def.groups.dig_immediate == 2 then
@ -490,6 +492,7 @@ doc.new_category("nodes", {
end
formstring = formstring .. "\n"
end
end
-- Custom factoids are inserted here
for i=1,#factoid_generators.nodes do