granular verbose message suppression mechanics
Switch to using a macro invocation Verbos(n, s) in place of the flags.verbose checks. Provide the mechanics for individual suppression of any of the existing messages that were considered verbose. Mechanics only - this code update does not provide any means of setting the suppression bits. iflags.verbose = 0 is still a master suppression of all the verbose messages. iflags.verbose = 1 turns on the verbose messages only for those whose suppression bit is 0 (not set).
This commit is contained in:
10
src/dig.c
10
src/dig.c
@@ -612,7 +612,7 @@ digactualhole(int x, int y, struct monst *madeby, int ttyp)
|
||||
add_damage(x, y, madeby_u ? SHOP_PIT_COST : 0L);
|
||||
} else if (!madeby_obj && canseemon(madeby)) {
|
||||
pline("%s digs a pit in the %s.", Monnam(madeby), surface_type);
|
||||
} else if (cansee(x, y) && flags.verbose) {
|
||||
} else if (cansee(x, y) && Verbose(0, digactualhole1)) {
|
||||
pline("A pit appears in the %s.", surface_type);
|
||||
}
|
||||
/* in case we're digging down while encased in solid rock
|
||||
@@ -644,7 +644,7 @@ digactualhole(int x, int y, struct monst *madeby, int ttyp)
|
||||
else if (!madeby_obj && canseemon(madeby))
|
||||
pline("%s digs a hole through the %s.", Monnam(madeby),
|
||||
surface_type);
|
||||
else if (cansee(x, y) && flags.verbose)
|
||||
else if (cansee(x, y) && Verbose(0, digactualhole2))
|
||||
pline("A hole appears in the %s.", surface_type);
|
||||
|
||||
if (at_u) {
|
||||
@@ -1283,7 +1283,7 @@ mdig_tunnel(struct monst *mtmp)
|
||||
return TRUE;
|
||||
}
|
||||
} else {
|
||||
if (flags.verbose) {
|
||||
if (Verbose(0, mdig_tunnel1)) {
|
||||
if (!Unaware && !rn2(3)) /* not too often.. */
|
||||
draft_message(TRUE); /* "You feel an unexpected draft." */
|
||||
}
|
||||
@@ -1310,7 +1310,7 @@ mdig_tunnel(struct monst *mtmp)
|
||||
|
||||
if (IS_WALL(here->typ)) {
|
||||
/* KMH -- Okay on arboreal levels (room walls are still stone) */
|
||||
if (flags.verbose && !rn2(5))
|
||||
if (Verbose(0, mdig_tunnel2) && !rn2(5))
|
||||
You_hear("crashing rock.");
|
||||
if (*in_rooms(mtmp->mx, mtmp->my, SHOPBASE))
|
||||
add_damage(mtmp->mx, mtmp->my, 0L);
|
||||
@@ -1994,7 +1994,7 @@ rot_corpse(anything *arg, long timeout)
|
||||
x = obj->ox;
|
||||
y = obj->oy;
|
||||
} else if (in_invent) {
|
||||
if (flags.verbose) {
|
||||
if (Verbose(0, rot_corpse)) {
|
||||
char *cname = corpse_xname(obj, (const char *) 0, CXN_NO_PFX);
|
||||
|
||||
Your("%s%s %s away%c", obj == uwep ? "wielded " : "", cname,
|
||||
|
||||
Reference in New Issue
Block a user