diff options
Diffstat (limited to 'crawl-ref/source/items.cc')
-rw-r--r-- | crawl-ref/source/items.cc | 15 |
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() |