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:14:01 +03:00
parent 9d3dfd59f9
commit b6125b8f78
2 changed files with 6 additions and 0 deletions
+5
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