From b6125b8f7846c66c0285fe8299cad940d27f9539 Mon Sep 17 00:00:00 2001 From: Pasi Kallinen Date: Fri, 16 Oct 2020 19:10:17 +0300 Subject: [PATCH] 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. --- doc/fixes37.0 | 1 + src/teleport.c | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/doc/fixes37.0 b/doc/fixes37.0 index 905af1491..f9c67c946 100644 --- a/doc/fixes37.0 +++ b/doc/fixes37.0 @@ -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 diff --git a/src/teleport.c b/src/teleport.c index f51001a7e..e72ac2d38 100644 --- a/src/teleport.c +++ b/src/teleport.c @@ -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