From 718202ee6b6445890db808f4420073e2cce506c2 Mon Sep 17 00:00:00 2001 From: dshaligram Date: Tue, 3 Jul 2007 17:59:49 +0000 Subject: Manual update (David). Added javelins and sling bullets. Only Urug gets javelins at the moment. No monster gets sling bullets, but they can be randomly generated. Added deep elf blademasters and master archers to provide Silence-users some entertainment on Elf:7. I've adjusted the non-rogue-layout Elf:7s to use blademasters. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1732 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/itemname.cc | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) (limited to 'crawl-ref/source/itemname.cc') diff --git a/crawl-ref/source/itemname.cc b/crawl-ref/source/itemname.cc index ca7c19769d..2c4ede1ca4 100644 --- a/crawl-ref/source/itemname.cc +++ b/crawl-ref/source/itemname.cc @@ -85,7 +85,8 @@ std::string quant_name( const item_def &item, int quant, // item buffer will be used. std::string item_def::name(description_level_type descrip, bool terse, bool ident, - bool with_inscription) const + bool with_inscription, + bool quantity_words) const { std::ostringstream buff; @@ -156,7 +157,12 @@ std::string item_def::name(description_level_type descrip, } if (descrip != DESC_BASENAME && descrip != DESC_QUALNAME) - buff << this->quantity << " "; + { + if (quantity_words) + buff << number_in_words(this->quantity) << " "; + else + buff << this->quantity << " "; + } } else { @@ -1049,18 +1055,8 @@ std::string item_def::name_aux( description_level_type desc, buff << ' '; } - buff << racial_description_string(*this, terse); - - switch (item_typ) - { - case MI_STONE: buff << "stone"; break; - case MI_ARROW: buff << "arrow"; break; - case MI_BOLT: buff << "bolt"; break; - case MI_DART: buff << "dart"; break; - case MI_NEEDLE: buff << "needle"; break; - case MI_LARGE_ROCK: buff << "large rock" ; break; - default: buff << "hysterical raisin"; break; - } + buff << racial_description_string(*this, terse) + << ammo_name(static_cast(item_typ)); if (know_type && !basename) { -- cgit v1.2.3-54-g00ecf