summaryrefslogtreecommitdiff
path: root/init.lua
diff options
context:
space:
mode:
authorWuzzy <almikes@aol.com>2016-10-30 19:53:30 +0100
committerWuzzy <almikes@aol.com>2016-10-30 19:53:30 +0100
commit0a9bf5502ce58982af095d6125b164c1b44bfca5 (patch)
treef056263490e045cce66066c87bc1137d8eeb70d2 /init.lua
parente653b365cb3989c4899cba01fac5e7b0e4f6dcd4 (diff)
Add more item def. fields
Diffstat (limited to 'init.lua')
-rw-r--r--init.lua8
1 files changed, 5 insertions, 3 deletions
diff --git a/init.lua b/init.lua
index f85b730..b49fdac 100644
--- a/init.lua
+++ b/init.lua
@@ -952,19 +952,18 @@ local function gather_descs()
end
-- NOTE: New group “not_in_doc”: Items with this group will not have entries
- -- NOTE: New group “hide_from_doc”: Items with this group will not be visible in the entry list initially
local add_entries = function(deftable, category_id)
for id, def in pairs(deftable) do
local name, ld, uh, im
local forced = false
- if (forced_items[id] == true or def.groups.in_doc) and def ~= nil then forced = true end
+ if (forced_items[id] == true or def.groups.in_doc or def.x_doc_items_create_entry == true) and def ~= nil then forced = true end
if item_name_overrides[id] ~= nil then
name = item_name_overrides[id]
else
name = def.description
end
- if not (name == nil or name == "" or def.groups.not_in_doc or forced_items[id] == false) or forced then
+ if not (name == nil or name == "" or def.groups.not_in_doc or forced_items[id] == false or def.x_doc_items_create_entry == false) or forced then
-- TODO: Document custom fields in API.md
if def.x_doc_items_longdesc then
ld = def.x_doc_items_longdesc
@@ -986,6 +985,9 @@ local function gather_descs()
end
local hidden
if id == "air" then hidden = false end
+ if type(def.x_doc_items_hidden) == "boolean" then
+ hidden = def.x_doc_items_hidden
+ end
local custom_image
name = scrub_newlines(name)
local infotable = {