diff options
author | Wuzzy <almikes@aol.com> | 2016-11-03 04:03:07 +0100 |
---|---|---|
committer | Wuzzy <almikes@aol.com> | 2016-11-03 04:03:07 +0100 |
commit | f6d658a830f3f668204a31f3d048c31a777fb15b (patch) | |
tree | a38c5a809b7db6e1fa8d37b6a083d6ab62ef8974 | |
parent | 1be13bdefd002cc12852ecfb959218d1af5c6bfd (diff) |
Allow to show itemstring
-rw-r--r-- | init.lua | 19 | ||||
-rw-r--r-- | settingtypes.txt | 4 |
2 files changed, 23 insertions, 0 deletions
@@ -24,6 +24,10 @@ local setting = minetest.setting_getbool("doc_items_friendly_group_names") if setting ~= nil then doc.sub.items.settings.friendly_group_names = setting end +setting = minetest.setting_getbool("doc_items_show_itemstrings") +if setting ~= nil then + doc.sub.items.settings.itemstring = setting +end -- Local stuff local groupdefs = {} @@ -720,6 +724,11 @@ doc.new_category("nodes", { datastring = newline2(datastring) datastring = datastring .. fuel_factoid(data.itemstring, "nodes") + if doc.sub.items.settings.itemstring ~= nil then + datastring = newline2(datastring) + datastring = datastring .. string.format(S("Itemstring: \"%s\""), data.itemstring) + end + formstring = formstring .. doc.widgets.text(datastring, 0, 0.5, 10.8, 8) return formstring @@ -791,6 +800,11 @@ doc.new_category("tools", { datastring = newline2(datastring) datastring = datastring .. fuel_factoid(data.itemstring, "tools") + if doc.sub.items.settings.itemstring ~= nil then + datastring = newline2(datastring) + datastring = datastring .. string.format(S("Itemstring: \"%s\""), data.itemstring) + end + formstring = formstring .. doc.widgets.text(datastring, 0, 0.5, 10.8, 8) return formstring @@ -854,6 +868,11 @@ doc.new_category("craftitems", { datastring = newline2(datastring) datastring = datastring .. fuel_factoid(data.itemstring, "craftitems") + if doc.sub.items.settings.itemstring ~= nil then + datastring = newline2(datastring) + datastring = datastring .. string.format(S("Itemstring: \"%s\""), data.itemstring) + end + formstring = formstring .. doc.widgets.text(datastring, 0, 0.5, 10.8, 8) return formstring diff --git a/settingtypes.txt b/settingtypes.txt index ca1adcd..83f940a 100644 --- a/settingtypes.txt +++ b/settingtypes.txt @@ -7,3 +7,7 @@ #understanding, they are not official. #This feature might be removed in later versions if it becomes obsolete. doc_items_friendly_group_names (Show “friendly” group names) bool false + +#If enabled, the mod will show the itemstring of the entry for each item. +#This is mostly for programmers and power users. +doc_items_show_itemstrings (Show itemstrings) bool false |