From 6c1c71a64485cb196aaa21082d04246bfe922466 Mon Sep 17 00:00:00 2001 From: j-p-e-g Date: Thu, 15 May 2008 23:46:58 +0000 Subject: Implement FR 1936340: add a shortcut for butchering (a)ll corpses in a stack. Does not yet differentiate between butchering and bottling (for Vampires), and if several butcher/sacrifice delays have been chained and are now interrupted, you only get the "not switching back to xyz" message if the interruption happens while butchering the last corpse. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5068 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/stuff.cc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'crawl-ref/source/stuff.cc') diff --git a/crawl-ref/source/stuff.cc b/crawl-ref/source/stuff.cc index 92c46482ac..c9be50c2ed 100644 --- a/crawl-ref/source/stuff.cc +++ b/crawl-ref/source/stuff.cc @@ -979,11 +979,14 @@ static std::string _list_alternative_yes(char yes1, char yes2, } static const char* _list_allowed_keys(char yes1, char yes2, - bool lowered = false) + bool lowered = false, + bool allow_all = false) { std::string result = " ["; result += (lowered ? "y" : "Y"); result += _list_alternative_yes(yes1, yes2, lowered); + if (allow_all) + result += (lowered? "/a" : "/A"); result += (lowered ? "/n/q" : "/N/Q"); result += "]"; @@ -1000,7 +1003,7 @@ int yesnoquit( const char* str, bool safe, int safeanswer, bool allow_all, std::string prompt = make_stringf("%s%s ", str ? str : "Buggy prompt?", _list_allowed_keys(alt_yes, alt_yes2, - safe)); + safe, allow_all)); while (true) { -- cgit v1.2.3-54-g00ecf