summaryrefslogtreecommitdiff
path: root/init.lua
diff options
context:
space:
mode:
authorWuzzy <almikes@aol.com>2016-08-05 00:02:34 +0200
committerWuzzy <almikes@aol.com>2016-08-05 00:02:34 +0200
commit715416d4e6b8cf796b47a83020355b5bfe7bf022 (patch)
tree793e55175837596bb288ee2e475f46d7019476e9 /init.lua
parent8afc78dfd79075ca017429b47087fc282ef74c04 (diff)
Add mining groups back
Diffstat (limited to 'init.lua')
-rw-r--r--init.lua14
1 files changed, 11 insertions, 3 deletions
diff --git a/init.lua b/init.lua
index f235601..ee91698 100644
--- a/init.lua
+++ b/init.lua
@@ -1,6 +1,7 @@
doc.sub.items = {}
local groupdefs = {}
+local mininggroups = {}
local miscgroups = {}
local forced_items = {
["air"] = true,
@@ -334,10 +335,10 @@ doc.new_category("nodes", {
local mstring = "This block can be mined by mining tools which match any of the following mining ratings and its mining level.\n"
mstring = mstring .. "Mining ratings:\n"
local minegroupcount = 0
- for g,name in pairs(groupdefs) do
- local rating = data.def.groups[g]
+ for group,_ in pairs(mininggroups) do
+ local rating = data.def.groups[group]
if rating ~= nil then
- mstring = mstring .. "- "..name..": "..rating.."\n"
+ mstring = mstring .. "- "..groupdefs[group]..": "..rating.."\n"
minegroupcount = minegroupcount + 1
end
end
@@ -613,6 +614,13 @@ function doc.sub.items.add_real_group_names(groupnames)
end
end
+-- Declare groups as mining groups
+function doc.sub.items.add_mining_groups(groupnames)
+ for g=1,#groupnames do
+ mininggroups[groupnames[g]] = true
+ end
+end
+
-- Adds groups to be displayed in the generic “misc.” groups
-- factoid. Those groups should be neither be used as mining
-- groups nor as damage groups and should be relevant to the