From 0e88d35a455c4c56b0edc0fc6729b0d1b8014731 Mon Sep 17 00:00:00 2001 From: j-p-e-g Date: Mon, 25 May 2009 09:07:41 +0000 Subject: * More tutorial tweaks (tiles, mostly). * Allow (r)eplacing an existing inscription as a shortcut to (c)learing + (i)nscribing. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9827 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/describe.cc | 29 ++++++++++++++++++++--------- 1 file changed, 20 insertions(+), 9 deletions(-) (limited to 'crawl-ref/source/describe.cc') diff --git a/crawl-ref/source/describe.cc b/crawl-ref/source/describe.cc index 9727d5f189..52899230e7 100644 --- a/crawl-ref/source/describe.cc +++ b/crawl-ref/source/describe.cc @@ -2349,14 +2349,15 @@ void inscribe_item(item_def &item, bool proper_prompt) // existing inscription become an option. if (!proper_prompt || need_autoinscribe || is_inscribed) { - prompt = "Press (i) to "; - prompt += (is_inscribed ? "add to inscription" - : "inscribe"); + if (!is_inscribed) + prompt = "Press (i) to inscribe"; + else + prompt = "Press (i) to add to or (r) to replace the inscription"; if (need_autoinscribe || is_inscribed) { if (!need_autoinscribe || !is_inscribed) - prompt += " or "; + prompt += ", or "; else prompt += ", "; @@ -2398,9 +2399,14 @@ void inscribe_item(item_def &item, bool proper_prompt) } // If autoinscription is impossible, prompt for an inscription instead. case 'i': + case 'r': { - prompt = (is_inscribed ? "Add what to inscription? " - : "Inscribe with what? "); + if (!is_inscribed) + prompt = "Inscribe with what? "; + else if (keyin == 'i') + prompt = "Add what to inscription? "; + else + prompt = "Replace inscription with what? "; if (proper_prompt) mpr(prompt.c_str(), MSGCH_PROMPT); @@ -2424,10 +2430,15 @@ void inscribe_item(item_def &item, bool proper_prompt) if (strlen(buf) > 0) { - if (is_inscribed) - item.inscription += ", "; + if (is_inscribed && keyin == 'r') + item.inscription = std::string(buf); + else + { + if (is_inscribed) + item.inscription += ", "; - item.inscription += std::string(buf); + item.inscription += std::string(buf); + } } } else if (proper_prompt) -- cgit v1.2.3-54-g00ecf