Add in_doc group

This commit is contained in:
Wuzzy 2016-08-04 00:18:32 +02:00
parent d2e19cfc08
commit e8ce097690

View File

@ -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