Verbose reversion follow-up

This commit is contained in:
nhmall
2023-10-29 21:02:47 -04:00
parent 6cbefc7c2d
commit a3f452bbe0
5 changed files with 17 additions and 174 deletions

View File

@@ -912,7 +912,7 @@ kick_door(coordxy x, coordxy y, int avrg_attrib)
boolean shopdoor = *in_rooms(x, y, SHOPBASE) ? TRUE : FALSE;
/* break the door */
if (gm.maploc->doormask & D_TRAPPED) {
if (Verbose(0, dokick))
if (flags.verbose)
You("kick the door.");
exercise(A_STR, FALSE);
gm.maploc->doormask = D_NODOOR;

View File

@@ -2569,10 +2569,19 @@ obj_to_let(struct obj *obj)
void
prinv(const char *prefix, struct obj *obj, long quan)
{
boolean total_of = (quan && (quan < obj->quan));
char totalbuf[QBUFSZ];
if (!prefix)
prefix = "";
pline("%s%s%s", prefix, *prefix ? " " : "",
xprname(obj, (char *) 0, obj_to_let(obj), TRUE, 0L, quan));
totalbuf[0] = '\0';
if (total_of)
Snprintf(totalbuf, sizeof totalbuf,
" (%ld in total).", obj->quan);
pline("%s%s%s%s", prefix, *prefix ? " " : "",
xprname(obj, (char *) 0, obj_to_let(obj), !total_of, 0L, quan),
flags.verbose ? totalbuf : "");
}
DISABLE_WARNING_FORMAT_NONLITERAL

View File

@@ -448,7 +448,7 @@ parseoptions(
boolean tfrom_file)
{
char *op;
boolean negated, got_match = FALSE;
boolean negated, got_match = FALSE, pfx_match = FALSE;
#if 0
boolean has_val = FALSE;
#endif
@@ -505,7 +505,7 @@ parseoptions(
if (allopt[i].pfx) {
if (str_start_is(opts, allopt[i].name, TRUE)) {
matchidx = i;
got_match = TRUE;
got_match = pfx_match = TRUE;
}
}
#if 0 /* this prevents "boolopt:True" &c */

View File

@@ -974,7 +974,7 @@ polymon(int mntmp)
/* the explanation of '#monster' used to be shown sooner, but there are
possible fatalities above and it isn't useful unless hero survives */
if (Verbose(2, polymon)) {
if (flags.verbose) {
static const char use_thec[] = "Use the command #%s to %s.";
static const char monsterc[] = "monster";
struct permonst *uptr = gy.youmonst.data;