Accessibility: Add location info to messages
Adds a new boolean option, accessiblemsg. If on, some game messages are prefixed with direction or location information, for example: (west): The newt bites! (northwest): You find a hidden door. I added the info to the most common messages, but several are still missing it.
This commit is contained in:
18
src/trap.c
18
src/trap.c
@@ -1808,7 +1808,8 @@ trapeffect_pit(
|
||||
/* openfallingtrap; not inescapable here */
|
||||
if (in_sight) {
|
||||
seetrap(trap);
|
||||
pline("%s doesn't fall into the pit.", Monnam(mtmp));
|
||||
pline_xy(mtmp->mx, mtmp->my,
|
||||
"%s doesn't fall into the pit.", Monnam(mtmp));
|
||||
}
|
||||
return Trap_Effect_Finished;
|
||||
}
|
||||
@@ -1819,8 +1820,9 @@ trapeffect_pit(
|
||||
if (!passes_walls(mptr))
|
||||
mtmp->mtrapped = 1;
|
||||
if (in_sight) {
|
||||
pline("%s %s into %s pit!", Monnam(mtmp), fallverb,
|
||||
a_your[trap->madeby_u]);
|
||||
pline_xy(mtmp->mx, mtmp->my,
|
||||
"%s %s into %s pit!", Monnam(mtmp), fallverb,
|
||||
a_your[trap->madeby_u]);
|
||||
if (mptr == &mons[PM_PIT_VIPER]
|
||||
|| mptr == &mons[PM_PIT_FIEND])
|
||||
pline("How pitiful. Isn't that the pits?");
|
||||
@@ -1872,18 +1874,20 @@ trapeffect_hole(
|
||||
if (in_sight) {
|
||||
seetrap(trap);
|
||||
if (tt == TRAPDOOR)
|
||||
pline(
|
||||
pline_xy(mtmp->mx, mtmp->my,
|
||||
"A trap door opens, but %s doesn't fall through.",
|
||||
mon_nam(mtmp));
|
||||
else /* (tt == HOLE) */
|
||||
pline("%s doesn't fall through the hole.",
|
||||
Monnam(mtmp));
|
||||
pline_xy(mtmp->mx, mtmp->my,
|
||||
"%s doesn't fall through the hole.",
|
||||
Monnam(mtmp));
|
||||
}
|
||||
return Trap_Effect_Finished; /* inescapable = FALSE; */
|
||||
}
|
||||
if (inescapable) { /* sokoban hole */
|
||||
if (in_sight) {
|
||||
pline("%s seems to be yanked down!", Monnam(mtmp));
|
||||
pline_xy(mtmp->mx, mtmp->my,
|
||||
"%s seems to be yanked down!", Monnam(mtmp));
|
||||
/* suppress message in mlevel_tele_trap() */
|
||||
in_sight = FALSE;
|
||||
seetrap(trap);
|
||||
|
||||
Reference in New Issue
Block a user