Pre-populate teleport destination prompt with travel destination

This has been implemented in multiple variants, and seems like
a small but useful quality of life improvement.
This commit is contained in:
Pasi Kallinen
2020-10-16 19:10:17 +03:00
parent 9d3dfd59f9
commit b6125b8f78
2 changed files with 6 additions and 0 deletions

View File

@@ -276,6 +276,7 @@ when reporting that hero can't repair a chest's broken lock with key/pick/card
just describe the base item without BUC, user assigned name, &c since
"You can't repair a chest's lock with an uncursed key." implicitly
suggests that you might be able to do so with a blessed or cursed one
pre-populate teleport destination prompt with travel destination
Fixes to 3.7.0-x Problems that Were Exposed Via git Repository

View File

@@ -528,6 +528,11 @@ struct obj *scroll;
learnscroll(scroll);
cc.x = u.ux;
cc.y = u.uy;
if (iflags.travelcc.x != 0 || iflags.travelcc.y != 0) {
/* The player showed some interest in traveling here;
* pre-suggest this coordinate. */
cc = iflags.travelcc;
}
if (getpos(&cc, TRUE, "the desired position") < 0)
return; /* abort */
/* possible extensions: introduce a small error if