summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/items.cc
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-12-08 20:15:03 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-12-08 20:15:03 +0000
commit8cbb227becdc172839b901aedf972022dc73118d (patch)
tree0bd26e8356d53ebe455ae21bdc391e7adb79beb9 /crawl-ref/source/items.cc
parent504342b26a04cf2e33cb49b61d721ee483f5c68b (diff)
downloadcrawl-ref-8cbb227becdc172839b901aedf972022dc73118d.tar.gz
crawl-ref-8cbb227becdc172839b901aedf972022dc73118d.zip
Apply a bunch of trunk commits, mostly by Haran, namely:
6766 (partly), 6834 (partly), 6867, 6892, 6903, 6906, 6908, 6909, 6927, 6928, 6929, 6943, 6945, 6946 * Message/description tweaks. * Fix enchanting hides not updating AC. * Fix incorrect score calculation. * All 't' commands now take a turn. * Don't prompt when swapping into dangerous terrain. * Fix backwards stealth check. * Fix off-by-1 error when selecting starting weapon. * Lichform discards holy wrath weapons. * Reinitialise zap counter for recharged wands, mention charges. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/branches/stone_soup-0.4@7786 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/items.cc')
-rw-r--r--crawl-ref/source/items.cc15
1 files changed, 13 insertions, 2 deletions
diff --git a/crawl-ref/source/items.cc b/crawl-ref/source/items.cc
index 2f7f552d3e..eed2f0be2d 100644
--- a/crawl-ref/source/items.cc
+++ b/crawl-ref/source/items.cc
@@ -2134,10 +2134,14 @@ void drop()
static void _autoinscribe_item( item_def& item )
{
- /* if there's an inscription already, do nothing */
- if ( item.inscription.size() > 0 )
+ // If there's an inscription already, do nothing - except
+ // for automatically generated inscriptions
+ if (!item.inscription.empty() && item.inscription != "god gift")
return;
+ const std::string old_inscription = item.inscription;
+ item.inscription.clear();
+
std::string iname = _autopickup_item_name(item);
for ( unsigned i = 0; i < Options.autoinscriptions.size(); ++i )
@@ -2161,6 +2165,13 @@ static void _autoinscribe_item( item_def& item )
item.inscription += str;
}
}
+ if ( !old_inscription.empty() )
+ {
+ if ( item.inscription.empty() )
+ item.inscription = old_inscription;
+ else
+ item.inscription = old_inscription + ", " + item.inscription;
+ }
}
static void _autoinscribe_floor_items()