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:
nhmall
2022-06-09 13:53:20 -04:00
parent fe235b7292
commit be76727265
41 changed files with 312 additions and 137 deletions

View File

@@ -27,7 +27,7 @@ static int vamp_shift(struct monst *, struct permonst *, boolean);
boolean
mb_trapped(struct monst *mtmp, boolean canseeit)
{
if (flags.verbose) {
if (Verbose(2, mb_trapped)) {
if (canseeit && !Unaware)
pline("KABOOM!! You see a door explode.");
else if (!Deaf)
@@ -1532,7 +1532,7 @@ m_move(register struct monst* mtmp, register int after)
}
if ((here->doormask & (D_LOCKED | D_CLOSED)) != 0
&& amorphous(ptr)) {
if (flags.verbose && canseemon(mtmp))
if (Verbose(2, m_move1) && canseemon(mtmp))
pline("%s %s under the door.", Monnam(mtmp),
(ptr == &mons[PM_FOG_CLOUD]
|| ptr->mlet == S_LIGHT) ? "flows" : "oozes");
@@ -1546,7 +1546,7 @@ m_move(register struct monst* mtmp, register int after)
if (mb_trapped(mtmp, canseeit))
return 2;
} else {
if (flags.verbose) {
if (Verbose(2, m_move2)) {
if (canseeit && canspotmon(mtmp))
pline("%s unlocks and opens a door.",
Monnam(mtmp));
@@ -1562,7 +1562,7 @@ m_move(register struct monst* mtmp, register int after)
if (mb_trapped(mtmp, canseeit))
return 2;
} else {
if (flags.verbose) {
if (Verbose(2, m_move3)) {
if (canseeit && canspotmon(mtmp))
pline("%s opens a door.", Monnam(mtmp));
else if (canseeit)
@@ -1583,7 +1583,7 @@ m_move(register struct monst* mtmp, register int after)
if (mb_trapped(mtmp, canseeit))
return 2;
} else {
if (flags.verbose) {
if (Verbose(2, m_move4)) {
if (canseeit && canspotmon(mtmp))
pline("%s smashes down a door.",
Monnam(mtmp));
@@ -1608,7 +1608,7 @@ m_move(register struct monst* mtmp, register int after)
pline("%s eats through the iron bars.", Monnam(mtmp));
dissolve_bars(mtmp->mx, mtmp->my);
return 3;
} else if (flags.verbose && canseemon(mtmp))
} else if (Verbose(2, m_move5) && canseemon(mtmp))
Norep("%s %s %s the iron bars.", Monnam(mtmp),
/* pluralization fakes verb conjugation */
makeplural(locomotion(ptr, "pass")),