summaryrefslogtreecommitdiff
path: root/init.lua
diff options
context:
space:
mode:
authorWuzzy <almikes@aol.com>2016-07-24 17:45:25 +0200
committerWuzzy <almikes@aol.com>2016-07-24 17:45:25 +0200
commit35b5c9acdd0f80972e3f5e297a00d651cedb93e7 (patch)
tree891c5bba006a063344845bdbb0c15e5b35a7bb3c /init.lua
parent122245edce64ff88307a27ae43101274bc945e75 (diff)
Add support to add texts from external source
Diffstat (limited to 'init.lua')
-rw-r--r--init.lua16
1 files changed, 14 insertions, 2 deletions
diff --git a/init.lua b/init.lua
index 76de1f7..d29c0ab 100644
--- a/init.lua
+++ b/init.lua
@@ -411,12 +411,24 @@ doc.new_category("craftitems", {
end
})
-
-
+doc.sub.minetest_game = {}
+doc.sub.minetest_game.help = {}
+doc.sub.minetest_game.help.longdesc = {}
+doc.sub.minetest_game.help.usagehelp = {}
+-- Gather help texts
+function doc.sub.minetest_game.add_helptexts(longdesc, usagehelp)
+ for k,v in pairs(longdesc) do
+ doc.sub.minetest_game.help.longdesc[k] = v
+ end
+ for k,v in pairs(usagehelp) do
+ doc.sub.minetest_game.help.usagehelp[k] = v
+ end
+end
dofile(minetest.get_modpath("doc_minetest_game") .. "/helptexts.lua")
local function gather_descs()
+ local help = doc.sub.minetest_game.help
doc.new_entry("nodes", "air", {
name = "Air",
data = {