summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/itemname.cc
diff options
context:
space:
mode:
authorharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2008-09-30 02:23:45 +0000
committerharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2008-09-30 02:23:45 +0000
commitb3a157e60e8c01aae3827e35e49306d775ea85d1 (patch)
tree670a371cb4de51ae9cb86ae987616977bb4c4baf /crawl-ref/source/itemname.cc
parent8e16f1a94ec8926ea4dc93f66e26c8512337e005 (diff)
downloadcrawl-ref-b3a157e60e8c01aae3827e35e49306d775ea85d1.tar.gz
crawl-ref-b3a157e60e8c01aae3827e35e49306d775ea85d1.zip
Mark quivered items as equipped (interface only, not gameplay.)
FR 2059687. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7071 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/itemname.cc')
-rw-r--r--crawl-ref/source/itemname.cc22
1 files changed, 14 insertions, 8 deletions
diff --git a/crawl-ref/source/itemname.cc b/crawl-ref/source/itemname.cc
index d8ab01f143..2d44e0a951 100644
--- a/crawl-ref/source/itemname.cc
+++ b/crawl-ref/source/itemname.cc
@@ -195,15 +195,11 @@ std::string item_def::name(description_level_type descrip,
if (this->link == you.equip[EQ_WEAPON])
{
- if (you.inv[ you.equip[EQ_WEAPON] ].base_type == OBJ_WEAPONS
- || item_is_staff( you.inv[ you.equip[EQ_WEAPON] ] ))
- {
+ if (this->base_type == OBJ_WEAPONS || item_is_staff(*this))
buff << " (weapon)";
- }
else
- {
buff << " (in hand)";
- }
+
equipped = true;
}
else if (this->link == you.equip[EQ_CLOAK]
@@ -231,12 +227,17 @@ std::string item_def::name(description_level_type descrip,
buff << " (around neck)";
equipped = true;
}
+ else if (this->link == you.m_quiver->get_fire_item(NULL))
+ {
+ buff << " (quivered)";
+ equipped = true; // well, sort of
+ }
}
if (descrip != DESC_BASENAME)
{
const bool tried = !ident && !equipped && item_type_tried(*this);
- std::string tried_str = "";
+ std::string tried_str;
if (tried)
{
@@ -2627,12 +2628,17 @@ const std::string menu_colour_item_prefix(const item_def &item, bool temp)
case OBJ_WEAPONS:
case OBJ_ARMOUR:
case OBJ_JEWELLERY:
- if (item_is_equipped(item))
+ if (item_is_equipped(item, true))
prefixes.push_back("equipped");
if (is_artefact(item))
prefixes.push_back("artefact");
break;
+ case OBJ_MISSILES:
+ if (item_is_equipped(item, true))
+ prefixes.push_back("equipped");
+ break;
+
default:
break;
}