'^O' command documentation and '^' command help

While looking for things in core which might conceivably trigger the
Windows ctype assertion failure (haven't found any yet), I noticed
that help_dir() was still treating ^O as a wizard mode-only command.
Also, documentation about that command was never brought up to date.

I wish this change to ^O hadn't been done.  #overview already has
a meta/alt M-O shortcut and overloading wizard mode commands makes
documentation more complicated since wizard mode stuff traditionally
has been left unmentioned.
This commit is contained in:
PatR
2016-05-26 18:35:27 -07:00
parent 962610f365
commit 49da8b87d8
4 changed files with 27 additions and 10 deletions
+2 -2
View File
@@ -1,5 +1,5 @@
^ Show the type of a trap ^ Show the type of a trap
^[ Cancel command ^[ Cancel command (same as ESCape key)
^A Redo the previous command ^A Redo the previous command
^C Quit the game ^C Quit the game
^D Kick something (usually a door, chest, or box) ^D Kick something (usually a door, chest, or box)
@@ -7,7 +7,7 @@
^F Map the level (available in debug mode only) ^F Map the level (available in debug mode only)
^G Create a monster (available in debug mode only) ^G Create a monster (available in debug mode only)
^I Identify all items (available in debug mode only) ^I Identify all items (available in debug mode only)
^O Show location of special levels (available in debug mode only) ^O Show dungeon overview (normal play) or special levels (debug mode)
^P Toggle through previously displayed game messages ^P Toggle through previously displayed game messages
^R Redraw screen ^R Redraw screen
^T Teleport around level ^T Teleport around level
+8
View File
@@ -691,6 +691,14 @@ a further menu or prompt will appear once you've closed this menu.
The available options The available options
are listed later in this Guidebook. Options are usually set before the are listed later in this Guidebook. Options are usually set before the
game rather than with the `O' command; see the section on options below. game rather than with the `O' command; see the section on options below.
.lp ^O
Show overview or show dungeon layout
.lp ""
In normal play and in explore mode, a shortcut for the ``#overview''
extended command to list interesting dungeon levels visited.
.lp ""
In debug mode, an extra command which lists the placement of all special
levels.
.lp p .lp p
Pay your shopping bill. Pay your shopping bill.
.lp P .lp P
+9
View File
@@ -835,6 +835,15 @@ The available options
are listed later in this Guidebook. Options are usually set before the are listed later in this Guidebook. Options are usually set before the
game rather than with the `{\tt O}' command; see the section on options below. game rather than with the `{\tt O}' command; see the section on options below.
%.lp %.lp
\item[\tb{\^{}O}]
Show overview or show dungeon layout\\
%.lp ""
In normal play and in explore mode, a shortcut for the ``{\tt \#overview}''
extended command to list interesting dungeon levels visited.\\
%.lp ""
In debug mode, an extra command which lists the placement of all special
levels.
%.lp
\item[\tb{p}] \item[\tb{p}]
Pay your shopping bill. Pay your shopping bill.
%.lp %.lp
+8 -8
View File
@@ -3794,9 +3794,9 @@ help_dir(sym, msg)
char sym; char sym;
const char *msg; const char *msg;
{ {
static const char wiz_only_list[] = "EFGIVW";
char ctrl; char ctrl;
winid win; winid win;
static const char wiz_only_list[] = "EFGIOVW";
char buf[BUFSZ], buf2[BUFSZ], *explain; char buf[BUFSZ], buf2[BUFSZ], *explain;
win = create_nhwindow(NHW_TEXT); win = create_nhwindow(NHW_TEXT);
@@ -3807,10 +3807,10 @@ const char *msg;
putstr(win, 0, buf); putstr(win, 0, buf);
putstr(win, 0, ""); putstr(win, 0, "");
} }
if (letter(sym)) { if (letter(sym) || sym == '[') { /* 'dat/cmdhelp' shows ESC as ^[ */
sym = highc(sym); sym = highc(sym); /* @A-Z[ (note: letter() accepts '@') */
ctrl = (sym - 'A') + 1; ctrl = (sym - 'A') + 1; /* 0-27 (note: 28-31 aren't applicable) */
if ((explain = dowhatdoes_core(ctrl, buf2)) if ((explain = dowhatdoes_core(ctrl, buf2)) != 0
&& (!index(wiz_only_list, sym) || wizard)) { && (!index(wiz_only_list, sym) || wizard)) {
Sprintf(buf, "Are you trying to use ^%c%s?", sym, Sprintf(buf, "Are you trying to use ^%c%s?", sym,
index(wiz_only_list, sym) index(wiz_only_list, sym)
@@ -3820,9 +3820,9 @@ const char *msg;
putstr(win, 0, ""); putstr(win, 0, "");
putstr(win, 0, explain); putstr(win, 0, explain);
putstr(win, 0, ""); putstr(win, 0, "");
putstr(win, 0, "To use that command, you press"); putstr(win, 0,
Sprintf(buf, "the <Ctrl> key, and the <%c> key at the same time.", "To use that command, hold down the <Ctrl> key as a shift");
sym); Sprintf(buf, "and press the <%c> key.", sym);
putstr(win, 0, buf); putstr(win, 0, buf);
putstr(win, 0, ""); putstr(win, 0, "");
} }