summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/itemname.cc
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-02-09 16:27:30 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-02-09 16:27:30 +0000
commit7bd87841d5e422d1b1b2a71c0dd65986918c8918 (patch)
tree7835c768e4cc65d863685c826693e86fccf43f02 /crawl-ref/source/itemname.cc
parent301a245ce60303235d952cc9be18976eeefb4270 (diff)
downloadcrawl-ref-7bd87841d5e422d1b1b2a71c0dd65986918c8918.tar.gz
crawl-ref-7bd87841d5e422d1b1b2a71c0dd65986918c8918.zip
Don't output inscriptions for DESC_PLAIN and DESC_BASENAME
descriptions. Also remove reference to weapons of disruption. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3413 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/itemname.cc')
-rw-r--r--crawl-ref/source/itemname.cc47
1 files changed, 25 insertions, 22 deletions
diff --git a/crawl-ref/source/itemname.cc b/crawl-ref/source/itemname.cc
index 6155950002..5298995774 100644
--- a/crawl-ref/source/itemname.cc
+++ b/crawl-ref/source/itemname.cc
@@ -231,30 +231,33 @@ std::string item_def::name(description_level_type descrip,
buff << " (around neck)";
equipped = true;
}
- }
-
- const bool tried = (!ident && !equipped && item_type_tried(*this));
- std::string tried_str = "";
-
- if (tried)
- {
- item_type_id_state_type id_type =
- get_ident_type(this->base_type, this->sub_type);
- if (id_type == ID_MON_TRIED_TYPE)
- tried_str = "tried by monster";
- else
- tried_str = "tried";
- }
+ }
+
+ if (descrip != DESC_PLAIN && descrip != DESC_BASENAME)
+ {
+ const bool tried = (!ident && !equipped && item_type_tried(*this));
+ std::string tried_str = "";
+
+ if (tried)
+ {
+ item_type_id_state_type id_type =
+ get_ident_type(this->base_type, this->sub_type);
+ if (id_type == ID_MON_TRIED_TYPE)
+ tried_str = "tried by monster";
+ else
+ tried_str = "tried";
+ }
- if ( with_inscription && !(this->inscription.empty()) )
- {
- buff << " {";
- if ( tried )
- buff << tried_str << ", ";
- buff << this->inscription << "}";
+ if ( with_inscription && !(this->inscription.empty()) )
+ {
+ buff << " {";
+ if ( tried )
+ buff << tried_str << ", ";
+ buff << this->inscription << "}";
+ }
+ else if ( tried )
+ buff << " {" << tried_str << "}";
}
- else if ( tried )
- buff << " {" << tried_str << "}";
return buff.str();
}