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:
Pasi Kallinen
2024-01-01 18:19:17 +02:00
parent d86e6e9717
commit dc8d9d6cd0
18 changed files with 138 additions and 29 deletions

View File

@@ -860,6 +860,7 @@ doopen_indir(coordxy x, coordxy y)
locked = TRUE;
break;
}
set_msg_xy(cc.x, cc.y);
pline("This door%s.", mesg);
if (locked && flags.autounlock) {
struct obj *unlocktool;
@@ -887,6 +888,7 @@ doopen_indir(coordxy x, coordxy y)
/* door is known to be CLOSED */
if (rnl(20) < (ACURRSTR + ACURR(A_DEX) + ACURR(A_CON)) / 3) {
set_msg_xy(cc.x, cc.y);
pline_The("door opens.");
if (door->doormask & D_TRAPPED) {
b_trapped("door", FINGER);
@@ -899,6 +901,7 @@ doopen_indir(coordxy x, coordxy y)
unblock_point(cc.x, cc.y); /* vision: new see through there */
} else {
exercise(A_STR, TRUE);
set_msg_xy(cc.x, cc.y);
pline_The("door resists!");
}