diff options
Diffstat (limited to 'crawl-ref/source/itemname.cc')
-rw-r--r-- | crawl-ref/source/itemname.cc | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/crawl-ref/source/itemname.cc b/crawl-ref/source/itemname.cc index 26210874c8..eaacf8c987 100644 --- a/crawl-ref/source/itemname.cc +++ b/crawl-ref/source/itemname.cc @@ -1605,6 +1605,15 @@ bool item_type_known( const item_def& item ) return false; } +bool item_type_known(const object_class_type base_type, const int sub_type) +{ + const item_type_id_type idt = objtype_to_idtype(base_type); + if ( idt != NUM_IDTYPE && sub_type < 50 ) + return ( type_ids[idt][sub_type] == ID_KNOWN_TYPE ); + else + return false; +} + bool item_type_tried( const item_def& item ) { if ( item_type_known(item) ) |