For travel target location, report if no known travel path

Yet another accessibility feature.  When asked for a location
to travel, and autodescribe is on, the location description
has "(no travel path)" appended, if there is no known path
to that location.
This commit is contained in:
Pasi Kallinen
2016-08-31 22:00:45 +03:00
parent 2710106661
commit f82205c232
6 changed files with 57 additions and 16 deletions

View File

@@ -316,7 +316,9 @@ int cx, cy;
cc.y = cy;
if (do_screen_description(cc, TRUE, sym, tmpbuf, &firstmatch)) {
(void) coord_desc(cx, cy, tmpbuf, iflags.getpos_coords);
pline("%s%s%s", firstmatch, *tmpbuf ? " " : "", tmpbuf);
pline("%s%s%s%s", firstmatch, *tmpbuf ? " " : "", tmpbuf,
(iflags.getloc_travelmode && !is_valid_travelpt(cx,cy))
? " (no travel path)" : "");
curs(WIN_MAP, cx, cy);
flush_screen(0);
}