summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/itemname.cc
diff options
context:
space:
mode:
authorzelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573>2008-12-06 02:45:10 +0000
committerzelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573>2008-12-06 02:45:10 +0000
commit4080747652bef98870bf0848cb2e62eb4151f59d (patch)
tree8ac548f7473b84359eb06fa55f9ea5670e9baf37 /crawl-ref/source/itemname.cc
parent45318493e42a49564759ac8c3e42093ca6fe9f6f (diff)
downloadcrawl-ref-4080747652bef98870bf0848cb2e62eb4151f59d.tar.gz
crawl-ref-4080747652bef98870bf0848cb2e62eb4151f59d.zip
Make titled artifact spellbooks dislay properly in inventory.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7754 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/itemname.cc')
-rw-r--r--crawl-ref/source/itemname.cc14
1 files changed, 7 insertions, 7 deletions
diff --git a/crawl-ref/source/itemname.cc b/crawl-ref/source/itemname.cc
index a6a07a2926..6e81c530ea 100644
--- a/crawl-ref/source/itemname.cc
+++ b/crawl-ref/source/itemname.cc
@@ -84,13 +84,6 @@ std::string item_def::name(description_level_type descrip,
if (descrip == DESC_NONE)
return ("");
- if (base_type == OBJ_BOOKS && (ident || item_type_known(*this))
- && book_has_title(*this))
- {
- if (descrip != DESC_DBNAME)
- descrip = DESC_PLAIN;
- }
-
const bool is_artefact = (is_fixed_artefact( *this )
|| (is_random_artefact( *this )));
@@ -115,6 +108,13 @@ std::string item_def::name(description_level_type descrip,
descrip = DESC_CAP_A;
}
+ if (base_type == OBJ_BOOKS && (ident || item_type_known(*this))
+ && book_has_title(*this))
+ {
+ if (descrip != DESC_DBNAME)
+ descrip = DESC_PLAIN;
+ }
+
if (terse && descrip != DESC_DBNAME)
descrip = DESC_PLAIN;