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

@@ -4323,11 +4323,14 @@ dotravel(VOID_ARGS)
cc.x = u.ux;
cc.y = u.uy;
}
iflags.getloc_travelmode = TRUE;
pline("Where do you want to travel to?");
if (getpos(&cc, TRUE, "the desired destination") < 0) {
/* user pressed ESC */
iflags.getloc_travelmode = FALSE;
return 0;
}
iflags.getloc_travelmode = FALSE;
iflags.travelcc.x = u.tx = cc.x;
iflags.travelcc.y = u.ty = cc.y;
cmd[0] = CMD_TRAVEL;