Change some command keys

Change 'v' from #versionshort to #chronicle.
Change 'V' from #history to #versionshort.
History can still be accessed either directly with the extended command,
or via the help menu.
Versionshort now accepts the m-prefix, and then shows the longer version.
This commit is contained in:
Pasi Kallinen
2026-03-21 17:54:16 +02:00
parent 1eadfa962d
commit 8e4c7f9fb5
6 changed files with 16 additions and 11 deletions

4
dat/hh
View File

@@ -34,8 +34,8 @@ O options set options
/ what-is tell what a map symbol represents / what-is tell what a map symbol represents
\ known display list of what's been discovered \ known display list of what's been discovered
| perminv interact with persistent inventory window instead of hero+map | perminv interact with persistent inventory window instead of hero+map
v version display version number v chronicle display a list of important events
V history display game history V version display version number
^A again redo the previous command ^A again redo the previous command
^R redraw redraw the screen ^R redraw redraw the screen
^P prevmsg repeat previous message (consecutive ^P's repeat earlier ones) ^P prevmsg repeat previous message (consecutive ^P's repeat earlier ones)

View File

@@ -1282,6 +1282,7 @@ Talk to someone.
Default key is \(oqM-c\(cq. Default key is \(oqM-c\(cq.
.lp "#chronicle" .lp "#chronicle"
Show a list of important game events. Show a list of important game events.
Default key is \(oqv\(cq.
.lp "#close " .lp "#close "
Close a door. Close a door.
Default key is \(oqc\(cq. Default key is \(oqc\(cq.
@@ -1382,7 +1383,6 @@ option is On, clicking on the hero (or steed when mounted) will
execute this command. execute this command.
.lp "#history " .lp "#history "
Show long version and game history. Show long version and game history.
Default key is \(oqV\(cq.
.lp #inventory .lp #inventory
Show your inventory. Show your inventory.
Default key is \(oqi\(cq. Default key is \(oqi\(cq.
@@ -1835,7 +1835,7 @@ Default key is \(oqM-v\(cq.
.lp #versionshort .lp #versionshort
Show the program's version number, plus the date and time that the Show the program's version number, plus the date and time that the
running copy was built from sources (not the version's release date). running copy was built from sources (not the version's release date).
Default key is \(oqv\(cq. Default key is \(oqV\(cq.
.lp "#vision " .lp "#vision "
Show vision array. Show vision array.
Autocompletes. Autocompletes.

View File

@@ -1321,7 +1321,7 @@ Cast a spell. Default key is `\texttt{Z}'.
Talk to someone. Default key is `\texttt{M-c}'. Talk to someone. Default key is `\texttt{M-c}'.
%.lp %.lp
\item[\#chronicle] \item[\#chronicle]
Show a list of important game events. Show a list of important game events. Default key is `\texttt{v}'.
%.lp %.lp
\item[\#close] \item[\#close]
Close a door. Default key is `\texttt{c}'. Close a door. Default key is `\texttt{c}'.
@@ -1425,7 +1425,7 @@ option is On, clicking on the hero (or steed when mounted) will
execute this command. execute this command.
%.lp %.lp
\item[\#history] \item[\#history]
Show long version and game history. Default key is `\texttt{V}'. Show long version and game history.
%.lp %.lp
\item[\#inventory] \item[\#inventory]
Show your inventory. Default key is `\texttt{i}'. Show your inventory. Default key is `\texttt{i}'.
@@ -1913,7 +1913,7 @@ Autocompletes. Default key is `\texttt{M-v}'.
\item[\#versionshort] \item[\#versionshort]
Show the program's version number, plus the date and time that the Show the program's version number, plus the date and time that the
running copy was built from sources (not the version's release date). running copy was built from sources (not the version's release date).
Default key is `\texttt{v}'. Default key is `\texttt{V}'.
%.lp %.lp
\item[\#vision] \item[\#vision]
Show vision array. Show vision array.

View File

@@ -1586,6 +1586,8 @@ priest donation amounts are explicitly stated, randomized slightly, based on
peak rather than current level, and allow for bulk donations (buying peak rather than current level, and allow for bulk donations (buying
larger amounts of clairvoyance/protection) if you have a lot of gold larger amounts of clairvoyance/protection) if you have a lot of gold
amulet of magical breathing increases power regeneration amulet of magical breathing increases power regeneration
change some command keys, 'v' is now chronicle, 'V' is versionshort,
m-prefix 'V' is longer version, remove key binding of #history
Fixes to 3.7.0-x General Problems Exposed Via git Repository Fixes to 3.7.0-x General Problems Exposed Via git Repository

View File

@@ -1690,7 +1690,7 @@ struct ext_func_tab extcmdlist[] = {
docast, IFBURIED, NULL }, docast, IFBURIED, NULL },
{ M('c'), "chat", "talk to someone", { M('c'), "chat", "talk to someone",
dotalk, IFBURIED | AUTOCOMPLETE, NULL }, dotalk, IFBURIED | AUTOCOMPLETE, NULL },
{ '\0', "chronicle", "show journal of major events", { 'v', "chronicle", "show journal of major events",
do_gamelog, IFBURIED | AUTOCOMPLETE | GENERALCMD, NULL }, do_gamelog, IFBURIED | AUTOCOMPLETE | GENERALCMD, NULL },
{ 'c', "close", "close a door", { 'c', "close", "close a door",
doclose, 0, NULL }, doclose, 0, NULL },
@@ -1735,7 +1735,7 @@ struct ext_func_tab extcmdlist[] = {
dohelp, IFBURIED | GENERALCMD, NULL }, dohelp, IFBURIED | GENERALCMD, NULL },
{ '\0', "herecmdmenu", "show menu of commands you can do here", { '\0', "herecmdmenu", "show menu of commands you can do here",
doherecmdmenu, IFBURIED | AUTOCOMPLETE | GENERALCMD, NULL }, doherecmdmenu, IFBURIED | AUTOCOMPLETE | GENERALCMD, NULL },
{ 'V', "history", "show long version and game history", { '\0', "history", "show long version and game history",
dohistory, IFBURIED | GENERALCMD, NULL }, dohistory, IFBURIED | GENERALCMD, NULL },
{ 'i', "inventory", "show your inventory", { 'i', "inventory", "show your inventory",
ddoinv, IFBURIED | GENERALCMD, NULL }, ddoinv, IFBURIED | GENERALCMD, NULL },
@@ -1923,8 +1923,8 @@ struct ext_func_tab extcmdlist[] = {
{ M('v'), "version", { M('v'), "version",
"list compile time options for this version of NetHack", "list compile time options for this version of NetHack",
doextversion, IFBURIED | AUTOCOMPLETE | GENERALCMD, NULL }, doextversion, IFBURIED | AUTOCOMPLETE | GENERALCMD, NULL },
{ 'v', "versionshort", "show version and date+time program was built", { 'V', "versionshort", "show version and date+time program was built",
doversion, IFBURIED | GENERALCMD, NULL }, doversion, IFBURIED | GENERALCMD | CMD_M_PREFIX, NULL },
{ '\0', "vision", "show vision array", { '\0', "vision", "show vision array",
wiz_show_vision, IFBURIED | AUTOCOMPLETE | WIZMODECMD, NULL }, wiz_show_vision, IFBURIED | AUTOCOMPLETE | WIZMODECMD, NULL },
{ '.', "wait", "rest one move while doing nothing", { '.', "wait", "rest one move while doing nothing",

View File

@@ -157,6 +157,9 @@ doversion(void)
{ {
char buf[BUFSZ]; char buf[BUFSZ];
if (iflags.menu_requested)
return doextversion();
pline("%s", getversionstring(buf, sizeof buf)); pline("%s", getversionstring(buf, sizeof buf));
return ECMD_OK; return ECMD_OK;
} }