Show extended command name in key help

(In the "?f")
This commit is contained in:
Pasi Kallinen
2021-03-26 17:57:50 +02:00
parent 2ba87da95c
commit 54eb25ad2e
2 changed files with 7 additions and 2 deletions

View File

@@ -422,6 +422,7 @@ if player managed to get multiple $ items, all but the last could be moved to
count could split them into even more slots count could split them into even more slots
when a monster on the far side of a closed door opens it, sometimes the hero when a monster on the far side of a closed door opens it, sometimes the hero
was told about the monster without it being displayed on the map was told about the monster without it being displayed on the map
also show extended command name when showing what a key does in help
Fixes to 3.7.0-x Problems that Were Exposed Via git Repository Fixes to 3.7.0-x Problems that Were Exposed Via git Repository

View File

@@ -2150,8 +2150,12 @@ key2extcmddesc(uchar key)
} }
/* finally, check whether 'key' is a command */ /* finally, check whether 'key' is a command */
if (g.Cmd.commands[key]) { if (g.Cmd.commands[key]) {
if (g.Cmd.commands[key]->ef_txt) if (g.Cmd.commands[key]->ef_txt) {
return g.Cmd.commands[key]->ef_desc; Sprintf(key2cmdbuf, "%s (#%s)",
g.Cmd.commands[key]->ef_desc,
g.Cmd.commands[key]->ef_txt);
return key2cmdbuf;
}
} }
return (char *) 0; return (char *) 0;
} }