summaryrefslogtreecommitdiff
path: root/init.lua
diff options
context:
space:
mode:
authorWuzzy <almikes@aol.com>2016-08-04 00:18:32 +0200
committerWuzzy <almikes@aol.com>2016-08-04 00:18:32 +0200
commite8ce0976906e3b56fa41170ccf9f72a5d1619e1f (patch)
treec6e3329c5b015250947378ed06bdad4b4f257350 /init.lua
parentd2e19cfc08d4e4204e80b3eed823d43adc84cb7f (diff)
Add in_doc group
Diffstat (limited to 'init.lua')
-rw-r--r--init.lua9
1 files changed, 5 insertions, 4 deletions
diff --git a/init.lua b/init.lua
index 58e31d0..4e39d11 100644
--- a/init.lua
+++ b/init.lua
@@ -670,13 +670,14 @@ local function gather_descs()
help.longdesc["air"] = "A transparent block, basically empty space. It is usually left behind after digging something."
end
- -- NOTE: Mod introduces group “not_in_doc”: Nodes with this group will not have entries
+ -- NOTE: Mod introduces group “not_in_doc”: Items with this group will not have entries
+ -- NOTE: New group “in_doc”: forces an entry on this item when the item would otherwise not have one
-- Add node entries
for id, def in pairs(minetest.registered_nodes) do
local name, ld, uh
local forced = false
- if forced_items[id] == true and minetest.registered_nodes[id] ~= nil then forced = true end
+ if (forced_items[id] == true or def.groups.in_doc) and minetest.registered_nodes[id] ~= nil then forced = true end
if item_name_overrides[id] ~= nil then
name = item_name_overrides[id]
else
@@ -721,7 +722,7 @@ local function gather_descs()
for id, def in pairs(minetest.registered_tools) do
local name, ld, uh
local forced = false
- if forced_items[id] == true and minetest.registered_tools[id] ~= nil then forced = true end
+ if (forced_items[id] == true or def.groups.in_doc) and minetest.registered_nodes[id] ~= nil then forced = true end
if item_name_overrides[id] ~= nil then
name = item_name_overrides[id]
else
@@ -752,7 +753,7 @@ local function gather_descs()
local name, ld, uh
name = def.description
local forced = false
- if forced_items[id] == true and minetest.registered_craftitems[id] ~= nil then forced = true end
+ if (forced_items[id] == true or def.groups.in_doc) and minetest.registered_nodes[id] ~= nil then forced = true end
if item_name_overrides[id] ~= nil then
name = item_name_overrides[id]
else