summaryrefslogtreecommitdiff
path: root/init.lua
diff options
context:
space:
mode:
authorWuzzy <almikes@aol.com>2016-12-16 17:05:45 +0100
committerWuzzy <almikes@aol.com>2016-12-16 17:05:45 +0100
commit7255593e2f4c8663581c3dbe11272cc048c59367 (patch)
treea5546be0bc5beaf29adfc3a691af39ac284ab15f /init.lua
parentdbdbc54321031485fca8084dd3c867ca2f6bdd8e (diff)
Simplify group gathering
Diffstat (limited to 'init.lua')
-rw-r--r--init.lua8
1 files changed, 3 insertions, 5 deletions
diff --git a/init.lua b/init.lua
index 67c8ab8..e7a1142 100644
--- a/init.lua
+++ b/init.lua
@@ -1049,9 +1049,9 @@ end
local function gather_descs()
local help = doc.sub.items.help
- -- 1st pass
- -- Gather all groups used for mining
+ -- 1st pass: Gather groups of interest
for id, def in pairs(minetest.registered_items) do
+ -- Gather all groups used for mining
if def.tool_capabilities ~= nil then
local groupcaps = def.tool_capabilities.groupcaps
if groupcaps ~= nil then
@@ -1062,10 +1062,8 @@ local function gather_descs()
end
end
end
- end
- -- ... and gather all groups which appear in crafting recipes
- for id, def in pairs(minetest.registered_items) do
+ -- ... and gather all groups which appear in crafting recipes
local crafts = minetest.get_all_craft_recipes(id)
if crafts ~= nil then
for c=1,#crafts do