replace die's underline with tombstones

easter egg suggested by thurin : )
develop
myk002 2022-09-23 08:34:22 -07:00
parent b07f3b5b6c
commit fae26b2375
No known key found for this signature in database
GPG Key ID: 8A39CA0FA0C16E78
2 changed files with 57 additions and 61 deletions

@ -321,6 +321,8 @@ local function scan_builtins(old_db)
HELP_SOURCES.RENDERED or HELP_SOURCES.STUB, HELP_SOURCES.RENDERED or HELP_SOURCES.STUB,
{entry_types=entry_types}) {entry_types=entry_types})
end end
-- easter egg: replace underline for 'die' help with tombstones
textdb.die.long_help = textdb.die.long_help:gsub('=', string.char(239))
end end
-- scan for enableable plugins and plugin-provided commands and add their help -- scan for enableable plugins and plugin-provided commands and add their help

@ -42,10 +42,7 @@ local files = {
['hack/docs/docs/Tags.txt']=[[ ['hack/docs/docs/Tags.txt']=[[
* fort: Tools that are useful while in fort mode. * fort: Tools that are useful while in fort mode.
* armok: Tools that give you complete control over * armok: Tools that give you complete control over an aspect of the game or provide access to information that the game intentionally keeps hidden.
an aspect of the game or provide access to
information that the game intentionally keeps
hidden.
* map: Tools that interact with the game map. * map: Tools that interact with the game map.
@ -55,18 +52,17 @@ local files = {
]], ]],
['hack/docs/docs/tools/hascommands.txt']=[[ ['hack/docs/docs/tools/hascommands.txt']=[[
hascommands hascommands
*********** ===========
**Tags:** fort | armok | units Tags: fort | armok | units
Documented a plugin that Documented a plugin that has commands.
has commands.
**Command:** "boxbinders" Command: "boxbinders"
Documented boxbinders. Documented boxbinders.
**Command:** "bindboxers" Command: "bindboxers"
Documented bindboxers. Documented bindboxers.
@ -74,12 +70,11 @@ Documented full help.
]], ]],
['hack/docs/docs/tools/samename.txt']=[[ ['hack/docs/docs/tools/samename.txt']=[[
samename samename
******** ========
**Tags:** fort | armok Tags: fort | armok | units
| units
**Command:** "samename" Command: "samename"
Documented samename. Documented samename.
@ -87,10 +82,9 @@ Documented full help.
]], ]],
['hack/docs/docs/tools/nocommand.txt']=[[ ['hack/docs/docs/tools/nocommand.txt']=[[
nocommand nocommand
********* =========
**Tags:** fort | armok | Tags: fort | armok | units
units
Documented nocommand. Documented nocommand.
@ -98,11 +92,11 @@ Documented full help.
]], ]],
['hack/docs/docs/tools/basic.txt']=[[ ['hack/docs/docs/tools/basic.txt']=[[
basic basic
***** =====
**Tags:** map Tags: map
**Command:** "basic" Command: "basic"
Documented basic. Documented basic.
@ -110,11 +104,11 @@ Documented full help.
]], ]],
['hack/docs/docs/tools/subdir/scriptname.txt']=[[ ['hack/docs/docs/tools/subdir/scriptname.txt']=[[
subdir/scriptname subdir/scriptname
***************** =================
**Tags:** map Tags: map
**Command:** "subdir/scriptname" Command: "subdir/scriptname"
Documented subdir/scriptname. Documented subdir/scriptname.
@ -126,9 +120,9 @@ Documented full help.
basic basic
===== =====
**Tags:** map Tags: map
**Command:** "basic" Command: "basic"
in-file basic. in-file basic.
@ -142,9 +136,9 @@ script contents
subdir/scriptname subdir/scriptname
================= =================
**Tags:** map Tags: map
**Command:** "subdir/scriptname" Command: "subdir/scriptname"
in-file scriptname. in-file scriptname.
@ -158,9 +152,9 @@ script contents
inscript_docs inscript_docs
============= =============
**Tags:** map | badtag Tags: map | badtag
**Command:** "inscript_docs" Command: "inscript_docs"
in-file inscript_docs. in-file inscript_docs.
@ -182,9 +176,9 @@ script contents
basic basic
===== =====
**Tags:** map Tags: map
**Command:** "basic" Command: "basic"
in-file basic (other). in-file basic (other).
@ -198,9 +192,9 @@ script contents
subdir/scriptname subdir/scriptname
================= =================
**Tags:** map Tags: map
**Command:** "subdir/scriptname" Command: "subdir/scriptname"
in-file scriptname (other). in-file scriptname (other).
@ -214,9 +208,9 @@ script contents
inscript_docs inscript_docs
============= =============
**Tags:** map Tags: map
**Command:** "inscript_docs" Command: "inscript_docs"
in-file inscript_docs (other). in-file inscript_docs (other).
@ -400,11 +394,11 @@ end
function test.get_entry_long_help() function test.get_entry_long_help()
local expected = [[ local expected = [[
basic basic
***** =====
**Tags:** map Tags: map
**Command:** Command:
"basic" "basic"
Documented Documented
@ -432,34 +426,34 @@ full help.
-- plugins/commands that have no doc files get the default template -- plugins/commands that have no doc files get the default template
expect.eq([[ls expect.eq([[ls
** ==
No help available. No help available.
]], h.get_entry_long_help('ls')) ]], h.get_entry_long_help('ls'))
expect.eq([[nodocs_hascommands expect.eq([[nodocs_hascommands
****************** ==================
No help available. No help available.
]], h.get_entry_long_help('nodocs_hascommands')) ]], h.get_entry_long_help('nodocs_hascommands'))
expect.eq([[nodocs_hascommands expect.eq([[nodocs_hascommands
****************** ==================
No help available. No help available.
]], h.get_entry_long_help('nodoc_command')) ]], h.get_entry_long_help('nodoc_command'))
expect.eq([[Nodocs samename. expect.eq([[Nodocs samename.
This command has the same name as its host plugin but no rst docs.]], h.get_entry_long_help('nodocs_samename')) This command has the same name as its host plugin but no rst docs.]], h.get_entry_long_help('nodocs_samename'))
expect.eq([[nodocs_nocommand expect.eq([[nodocs_nocommand
**************** ================
No help available. No help available.
]], h.get_entry_long_help('nodocs_nocommand')) ]], h.get_entry_long_help('nodocs_nocommand'))
expect.eq([[nodocs_script expect.eq([[nodocs_script
************* =============
No help available. No help available.
]], h.get_entry_long_help('nodocs_script')) ]], h.get_entry_long_help('nodocs_script'))
expect.eq([[inscript_short_only expect.eq([[inscript_short_only
******************* ===================
No help available. No help available.
]], h.get_entry_long_help('inscript_short_only')) ]], h.get_entry_long_help('inscript_short_only'))
@ -468,9 +462,9 @@ No help available.
expect.eq([[inscript_docs expect.eq([[inscript_docs
============= =============
**Tags:** map | badtag Tags: map | badtag
**Command:** "inscript_docs" Command: "inscript_docs"
in-file inscript_docs. in-file inscript_docs.