summaryrefslogtreecommitdiffstats
path: root/crawl-ref
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2014-08-15 16:28:40 -0400
committerJesse Luehrs <doy@tozt.net>2014-08-15 16:31:13 -0400
commitefb7ffefa5659f324737f83a114460c1fc5fc632 (patch)
treec1df4adf5638a9ab81beb7967e015f45731b288b /crawl-ref
parentfedf9161c42865e6853449f5bd701a4fef40e690 (diff)
downloadcrawl-ref-efb7ffefa5659f324737f83a114460c1fc5fc632.tar.gz
crawl-ref-efb7ffefa5659f324737f83a114460c1fc5fc632.zip
allow 'p' on the prompt for sacrificable items
Diffstat (limited to 'crawl-ref')
-rw-r--r--crawl-ref/source/travel.cc39
1 files changed, 28 insertions, 11 deletions
diff --git a/crawl-ref/source/travel.cc b/crawl-ref/source/travel.cc
index 4fc4564afa..3857f836df 100644
--- a/crawl-ref/source/travel.cc
+++ b/crawl-ref/source/travel.cc
@@ -3059,19 +3059,36 @@ void start_explore(bool grab_items)
else if (Options.auto_sacrifice == AS_PROMPT_IGNORE)
{
// Make Escape => 'n' and stop run.
- explicit_keymap map;
- map[ESCAPE] = 'n';
- map[CONTROL('G')] = 'n';
- if (yesno("There are sacrificable items here, ignore them?",
- true, 'y', true, false, false, &map))
+ bool repeat_prompt = false;
+ do
{
- mark_items_non_visit_at(you.pos());
- }
- else
- {
- you.running = 0; // Abort explore.
- return;
+ mprf(MSGCH_PROMPT,
+ "There are sacrificable items here, ignore them? "
+ "[(Y)es/(p)ray/(n)o]");
+ repeat_prompt = false;
+
+ switch (getchm(KMC_CONFIRM))
+ {
+ case 'Y':
+ mark_items_non_visit_at(you.pos());
+ break;
+
+ case 'p':
+ pray();
+ //fallthrough
+ case 'n':
+ case 'N':
+ case ESCAPE:
+ case CONTROL('G'):
+ you.running = 0; // Abort explore.
+ return;
+
+ default:
+ repeat_prompt = true;
+ break;
+ }
}
+ while (repeat_prompt);
}
else
mark_items_non_visit_at(you.pos());