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

@@ -334,7 +334,7 @@ describe_decor(void)
if (strcmp(dfeature, "swamp"))
dfeature = an(dfeature);
if (flags.verbose) {
if (Verbose(2, describe_decor1)) {
Sprintf(outbuf, "There is %s here.", dfeature);
} else {
if (dfeature != fbuf)
@@ -350,7 +350,7 @@ describe_decor(void)
if (iflags.last_msg != PLNMSG_BACK_ON_GROUND)
pline("%s %s %s.",
flags.verbose ? "You are back" : "Back",
Verbose(2, describe_decor2) ? "You are back" : "Back",
(Levitation || Flying) ? "over" : "on",
ground);
}
@@ -2247,7 +2247,7 @@ loot_mon(struct monst *mtmp, int *passed_info, boolean *prev_loot)
return 1;
}
extract_from_minvent(mtmp, otmp, TRUE, FALSE);
if (flags.verbose)
if (Verbose(2, loot_mon))
You("take %s off of %s.",
thesimpleoname(otmp), mon_nam(mtmp));
otmp = hold_another_object(otmp, "You drop %s!", doname(otmp),
@@ -3281,7 +3281,8 @@ dotip(void)
/* check floor container(s) first; at most one will be accessed */
if ((boxes = container_at(cc.x, cc.y, TRUE)) > 0) {
Sprintf(buf, "You can't tip %s while carrying so much.",
!flags.verbose ? "a container" : (boxes > 1) ? "one" : "it");
!Verbose(2, dotip)
? "a container" : (boxes > 1) ? "one" : "it");
if (!check_capacity(buf) && able_to_loot(cc.x, cc.y, FALSE)) {
if (boxes > 1 && (flags.menu_style != MENU_TRADITIONAL
|| iflags.menu_requested)) {