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

@@ -235,13 +235,13 @@ erode_obj(
} else if (!erosion_matters(otmp)) {
return ER_NOTHING;
} else if (!vulnerable || (otmp->oerodeproof && otmp->rknown)) {
if (flags.verbose && print && (uvictim || vismon))
if (Verbose(3, erode_obj1) && print && (uvictim || vismon))
pline("%s %s %s not affected by %s.",
uvictim ? "Your" : s_suffix(Monnam(victim)),
ostr, vtense(ostr, "are"), bythe[type]);
return ER_NOTHING;
} else if (otmp->oerodeproof || (otmp->blessed && !rnl(4))) {
if (flags.verbose && (print || otmp->oerodeproof)
if (Verbose(3, erode_obj2) && (print || otmp->oerodeproof)
&& (uvictim || vismon || visobj))
pline("Somehow, %s %s %s not affected by the %s.",
uvictim ? "your"
@@ -299,7 +299,7 @@ erode_obj(
delobj(otmp);
return ER_DESTROYED;
} else {
if (flags.verbose && print) {
if (Verbose(3, erode_obj3) && print) {
if (uvictim)
Your("%s %s completely %s.",
ostr, vtense(ostr, Blind ? "feel" : "look"), msg[type]);
@@ -1125,7 +1125,7 @@ trapeffect_rocktrap(
} else if (is_metallic(uarmh)) {
pline("Fortunately, you are wearing a hard helmet.");
dmg = 2;
} else if (flags.verbose) {
} else if (Verbose(3, trapeffect_rocktrap)) {
pline("%s does not protect you.", Yname2(uarmh));
}
} else if (passes_rocks(g.youmonst.data)) {
@@ -3613,7 +3613,7 @@ climb_pit(void)
pitname);
fill_pit(u.ux, u.uy);
g.vision_full_recalc = 1; /* vision limits change */
} else if (u.dz || flags.verbose) {
} else if (u.dz || Verbose(3, climb_pit)) {
/* these should use 'pitname' rather than "pit" for hallucination
but that would nullify Norep (this message can be repeated
many times without further user intervention by using a run
@@ -4337,7 +4337,7 @@ drown(void)
if (Amphibious || Swimming) {
if (Amphibious) {
if (flags.verbose)
if (Verbose(3, drown))
pline("But you aren't drowning.");
if (!Is_waterlevel(&u.uz)) {
if (Hallucination)