^G prompting
Make the initial prompt for ^G be less verbose. Only expand to the verbose form if a second or further try is needed. Also, remove an orphan comment about is_male() and is_female().
This commit is contained in:
15
src/read.c
15
src/read.c
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.7 read.c $NHDT-Date: 1608846072 2020/12/24 21:41:12 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.207 $ */
|
||||
/* NetHack 3.7 read.c $NHDT-Date: 1609285441 2020/12/29 23:44:01 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.213 $ */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/*-Copyright (c) Robert Patrick Rankin, 2012. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
@@ -2625,7 +2625,6 @@ struct _create_particular_data *d;
|
||||
continue;
|
||||
}
|
||||
mx = mtmp->mx, my = mtmp->my;
|
||||
/* 'is_FOO()' ought to be called 'always_FOO()' */
|
||||
if (d->maketame) {
|
||||
(void) tamedog(mtmp, (struct obj *) 0);
|
||||
} else if (d->makepeaceful || d->makehostile) {
|
||||
@@ -2691,12 +2690,15 @@ struct _create_particular_data *d;
|
||||
boolean
|
||||
create_particular()
|
||||
{
|
||||
char buf[BUFSZ] = DUMMY, *bufp;
|
||||
int tryct = 5;
|
||||
#define CP_TRYLIM 5
|
||||
struct _create_particular_data d;
|
||||
char *bufp, buf[BUFSZ], prompt[QBUFSZ];
|
||||
int tryct = CP_TRYLIM;
|
||||
|
||||
buf[0] = '\0'; /* for EDIT_GETLIN */
|
||||
Strcpy(prompt, "Create what kind of monster?");
|
||||
do {
|
||||
getlin("Create what kind of monster? [type the name or symbol]", buf);
|
||||
getlin(prompt, buf);
|
||||
bufp = mungspaces(buf);
|
||||
if (*bufp == '\033')
|
||||
return FALSE;
|
||||
@@ -2706,6 +2708,9 @@ create_particular()
|
||||
|
||||
/* no good; try again... */
|
||||
pline("I've never heard of such monsters.");
|
||||
/* when a second try is needed, expand the prompt */
|
||||
if (tryct == CP_TRYLIM - 1)
|
||||
Strcat(prompt, " [type name or symbol]");
|
||||
} while (--tryct > 0);
|
||||
|
||||
if (!tryct)
|
||||
|
||||
Reference in New Issue
Block a user