From 25edd16945137b79d3cc8b6cb5fc34c402870749 Mon Sep 17 00:00:00 2001 From: nhmall Date: Mon, 4 Nov 2019 12:28:25 -0500 Subject: [PATCH] code maintenance bit to white-list current "You hear" instances Flag existing occurrences of "You hear" as "Deaf-aware" so that a grep for that string in the future doesn't need to trigger further investigation of those. --- doc/fixes36.3 | 3 +++ src/dokick.c | 2 +- src/engrave.c | 2 +- src/mcastu.c | 2 +- src/mkmaze.c | 2 +- src/music.c | 3 ++- src/pline.c | 2 +- src/shk.c | 2 +- src/trap.c | 3 ++- src/zap.c | 2 +- 10 files changed, 14 insertions(+), 9 deletions(-) diff --git a/doc/fixes36.3 b/doc/fixes36.3 index 12490115f..055d5ec27 100644 --- a/doc/fixes36.3 +++ b/doc/fixes36.3 @@ -403,5 +403,8 @@ autopickup exception priority change in pull request #226 Code Cleanup and Reorganization ------------------------------- began to add some function caller BREADCRUMBS to aid debugging +flag existing occurrences of "You hear" as "Deaf-aware" to aid in + future maintenance + diff --git a/src/dokick.c b/src/dokick.c index 3524a5ab5..d70b2e504 100644 --- a/src/dokick.c +++ b/src/dokick.c @@ -1205,7 +1205,7 @@ dokick() !Blind ? "Muddy waste pops up from the drain" : !Deaf - ? "You hear a sloshing sound" + ? "You hear a sloshing sound" /* Deaf-aware */ : "Something splashes you in the", buf); if (!(maploc->looted & S_LRING)) { /* once per sink */ if (!Blind) diff --git a/src/engrave.c b/src/engrave.c index a66373324..d81144cc0 100644 --- a/src/engrave.c +++ b/src/engrave.c @@ -755,7 +755,7 @@ doengrave() } Strcpy(post_engr_text, (Blind && !Deaf) - ? "You hear drilling!" + ? "You hear drilling!" /* Deaf-aware */ : Blind ? "You feel tremors." : IS_GRAVE(levl[u.ux][u.uy].typ) diff --git a/src/mcastu.c b/src/mcastu.c index 652a6105a..1b2fb632b 100644 --- a/src/mcastu.c +++ b/src/mcastu.c @@ -72,7 +72,7 @@ boolean undirected; pline("%s points %s.", Monnam(mtmp), point_msg); } else if ((!(moves % 4) || !rn2(4))) { if (!Deaf) - Norep("You hear a mumbled curse."); + Norep("You hear a mumbled curse."); /* Deaf-aware */ } } diff --git a/src/mkmaze.c b/src/mkmaze.c index 999d5af9d..ed38053f2 100644 --- a/src/mkmaze.c +++ b/src/mkmaze.c @@ -1365,7 +1365,7 @@ fumaroles() } } if (snd && !Deaf) - Norep("You hear a %swhoosh!", loud ? "loud " : ""); + Norep("You hear a %swhoosh!", loud ? "loud " : ""); /* Deaf-aware */ } /* diff --git a/src/music.c b/src/music.c index c1eed4359..53baeb42e 100644 --- a/src/music.c +++ b/src/music.c @@ -188,7 +188,8 @@ struct monst *bugler; /* monster that played instrument */ if (canseemon(mtmp)) pline("%s is now ready for battle!", Monnam(mtmp)); else if (!Deaf) - Norep("You hear the rattle of battle gear being readied."); + Norep("%s the rattle of battle gear being readied.", + "You hear"); /* Deaf-aware */ } else if ((distm = ((bugler == &youmonst) ? distu(mtmp->mx, mtmp->my) : dist2(bugler->mx, bugler->my, mtmp->mx, diff --git a/src/pline.c b/src/pline.c index d7db3f43d..b1ac1dffc 100644 --- a/src/pline.c +++ b/src/pline.c @@ -367,7 +367,7 @@ VA_DECL(const char *, line) else if (Unaware) YouPrefix(tmp, "You dream that you hear ", line); else - YouPrefix(tmp, "You hear ", line); + YouPrefix(tmp, "You hear ", line); /* Deaf-aware */ vpline(strcat(tmp, line), VA_ARGS); VA_END(); } diff --git a/src/shk.c b/src/shk.c index 74957e82e..815c2e726 100644 --- a/src/shk.c +++ b/src/shk.c @@ -2990,7 +2990,7 @@ boolean peaceful, silent; Norep("%s booms: \"%s, you are a thief!\"", Shknam(shkp), plname); } else if (!Deaf) { - Norep("You hear a scream, \"Thief!\""); + Norep("You hear a scream, \"Thief!\""); /* Deaf-aware */ } } hot_pursuit(shkp); diff --git a/src/trap.c b/src/trap.c index cb025e514..071bad6dc 100644 --- a/src/trap.c +++ b/src/trap.c @@ -2637,7 +2637,8 @@ register struct monst *mtmp; a_your[trap->madeby_u]); } if (!in_sight && !Deaf) - pline("Kaablamm! You hear an explosion in the distance!"); + pline("Kaablamm! %s an explosion in the distance!", + "You hear"); /* Deaf-aware */ blow_up_landmine(trap); /* explosion might have destroyed a drawbridge; don't dish out more damage if monster is already dead */ diff --git a/src/zap.c b/src/zap.c index 8040a6c71..bc4189a47 100644 --- a/src/zap.c +++ b/src/zap.c @@ -4442,7 +4442,7 @@ short exploding_wand_typ; melt_ice(x, y, (char *) 0); } else if (is_pool(x, y)) { const char *msgtxt = (!Deaf) - ? "You hear hissing gas." + ? "You hear hissing gas." /* Deaf-aware */ : "That seemed remarkably uneventful."; if (lev->typ != POOL) { /* MOAT or DRAWBRIDGE_UP */