summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/itemprop.cc
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-02-24 15:31:21 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-02-24 15:31:21 +0000
commitbbefa2c38bdcc3a38225b3eed7a8475764c5671d (patch)
tree2a3403a555ff4d127589b79e7f72f46b704919a4 /crawl-ref/source/itemprop.cc
parent5cc9690e25b97f8b32f18f71777d89754102fa27 (diff)
downloadcrawl-ref-bbefa2c38bdcc3a38225b3eed7a8475764c5671d.tar.gz
crawl-ref-bbefa2c38bdcc3a38225b3eed7a8475764c5671d.zip
Outsource randart names.
Also: - Move database text files into subfolder "database", yay! - Don't print "uncursed" for identified randart weapons/jewellery as the status should be obvious once the name is known. - A bit of code cleanup (change in enum.h breaks saves!) git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3460 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/itemprop.cc')
-rw-r--r--crawl-ref/source/itemprop.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/crawl-ref/source/itemprop.cc b/crawl-ref/source/itemprop.cc
index 2dc8e9bcce..86e20cd1d2 100644
--- a/crawl-ref/source/itemprop.cc
+++ b/crawl-ref/source/itemprop.cc
@@ -1907,6 +1907,10 @@ int ring_has_pluses( const item_def &item )
{
ASSERT (item.base_type == OBJ_JEWELLERY);
+ // not known -> no pluses
+ if (!item_type_known(item))
+ return (0);
+
switch (item.sub_type)
{
case RING_SLAYING:
@@ -2448,6 +2452,8 @@ std::string item_base_name(const item_def &item)
return Missile_prop[Missile_index[item.sub_type]].name;
case OBJ_ARMOUR:
return Armour_prop[Armour_index[item.sub_type]].name;
+ case OBJ_JEWELLERY:
+ return (jewellery_is_amulet(item) ? "amulet" : "ring");
default:
return "";
}