Make REDO unconditional.
This commit is contained in:
12
src/invent.c
12
src/invent.c
@@ -928,11 +928,9 @@ register const char *let,*word;
|
||||
Sprintf(qbuf, "What do you want to %s? [%s or ?*]",
|
||||
word, buf);
|
||||
}
|
||||
#ifdef REDO
|
||||
if (in_doagain)
|
||||
ilet = readchar();
|
||||
else
|
||||
#endif
|
||||
ilet = yn_function(qbuf, (char *)0, '\0');
|
||||
if (digit(ilet) && !allowcnt) {
|
||||
pline("No count allowed with this command.");
|
||||
@@ -940,9 +938,7 @@ register const char *let,*word;
|
||||
}
|
||||
if (ilet == '0') prezero = TRUE;
|
||||
while (digit(ilet)) {
|
||||
#ifdef REDO
|
||||
if (ilet != '?' && ilet != '*') savech(ilet);
|
||||
#endif
|
||||
/* accumulate unless cnt has overflowed */
|
||||
if (allowcnt < 3) {
|
||||
prevcnt = cnt;
|
||||
@@ -1018,23 +1014,17 @@ register const char *let,*word;
|
||||
}
|
||||
}
|
||||
context.botl = 1; /* May have changed the amount of money */
|
||||
#ifdef REDO
|
||||
savech(ilet);
|
||||
#endif
|
||||
for (otmp = invent; otmp; otmp = otmp->nobj)
|
||||
if (otmp->invlet == ilet) break;
|
||||
if(!otmp) {
|
||||
You("don't have that object.");
|
||||
#ifdef REDO
|
||||
if (in_doagain) return((struct obj *) 0);
|
||||
#endif
|
||||
continue;
|
||||
} else if (cnt < 0 || otmp->quan < cnt) {
|
||||
You("don't have that many! You have only %ld.",
|
||||
otmp->quan);
|
||||
#ifdef REDO
|
||||
if (in_doagain) return((struct obj *) 0);
|
||||
#endif
|
||||
continue;
|
||||
}
|
||||
break;
|
||||
@@ -2102,9 +2092,7 @@ dotypeinv()
|
||||
|
||||
if(class_count > 1) {
|
||||
c = yn_function(prompt, types, '\0');
|
||||
#ifdef REDO
|
||||
savech(c);
|
||||
#endif
|
||||
if(c == '\0') {
|
||||
clear_nhwindow(WIN_MESSAGE);
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user