summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/describe.cc
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2009-05-25 09:07:41 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2009-05-25 09:07:41 +0000
commit0e88d35a455c4c56b0edc0fc6729b0d1b8014731 (patch)
tree535b85c7c4e4ab869c195dc16bf0b77df9733007 /crawl-ref/source/describe.cc
parent57bdaabbe48d32989e7c69b8d66041e683fe1d49 (diff)
downloadcrawl-ref-0e88d35a455c4c56b0edc0fc6729b0d1b8014731.tar.gz
crawl-ref-0e88d35a455c4c56b0edc0fc6729b0d1b8014731.zip
* 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
Diffstat (limited to 'crawl-ref/source/describe.cc')
-rw-r--r--crawl-ref/source/describe.cc29
1 files changed, 20 insertions, 9 deletions
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)