From 35b5c9acdd0f80972e3f5e297a00d651cedb93e7 Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Sun, 24 Jul 2016 17:45:25 +0200 Subject: Add support to add texts from external source --- init.lua | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'init.lua') 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 = { -- cgit v1.2.3