From fc767d9b3b123f6bdf37e30b78200c06f042b570 Mon Sep 17 00:00:00 2001 From: haranp Date: Sat, 14 Jul 2007 12:57:54 +0000 Subject: Rewrite of the shopping code. Much cleaner now. Hopefully I didn't break anything. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1861 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/itemprop.cc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'crawl-ref/source/itemprop.cc') diff --git a/crawl-ref/source/itemprop.cc b/crawl-ref/source/itemprop.cc index 1e8d20ae10..8162a4cd88 100644 --- a/crawl-ref/source/itemprop.cc +++ b/crawl-ref/source/itemprop.cc @@ -460,15 +460,16 @@ bool item_ident( const item_def &item, unsigned long flags ) void set_ident_flags( item_def &item, unsigned long flags ) { - const bool known_before = fully_identified(item); item.flags |= flags; if (notes_are_active() && !(item.flags & ISFLAG_NOTED_ID) && - !known_before && fully_identified(item) && is_interesting_item(item)) + fully_identified(item) && is_interesting_item(item)) { - /* make a note of it */ + // make a note of it take_note(Note(NOTE_ID_ITEM, 0, 0, item.name(DESC_NOCAP_A).c_str(), origin_desc(item).c_str())); - item.flags |= ISFLAG_NOTED_ID; + // sometimes (e.g. shops) you can ID an item before you get it; + // don't note twice in those cases + item.flags |= (ISFLAG_NOTED_ID | ISFLAG_NOTED_GET); } } @@ -517,8 +518,7 @@ unsigned long full_ident_mask( const item_def& item ) if (item_type_known(item)) flagset &= (~ISFLAG_KNOW_TYPE); - if ( is_random_artefact(item) || - is_fixed_artefact(item) ) + if ( is_artefact(item) ) { flagset |= ISFLAG_KNOW_PROPERTIES; } -- cgit v1.2.3-54-g00ecf