diff options
author | zelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-06-19 03:30:46 +0000 |
---|---|---|
committer | zelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-06-19 03:30:46 +0000 |
commit | a98b88c34760cb85963de4782bae483c5a175bc5 (patch) | |
tree | cc520b860cbd9f0354872d74fdc108efba2ddf67 | |
parent | 478bb9ee6ad07a89755cd4314a703bfce4f2c395 (diff) | |
download | crawl-ref-a98b88c34760cb85963de4782bae483c5a175bc5.tar.gz crawl-ref-a98b88c34760cb85963de4782bae483c5a175bc5.zip |
note_items now only notes when items are identified. NOTE_GET_ITEM is
now hardcoded for when runes, the Orb, or artefacts are first picked up.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5968 c06c8d41-db1a-0410-9941-cceddc491573
-rw-r--r-- | crawl-ref/docs/options_guide.txt | 10 | ||||
-rw-r--r-- | crawl-ref/source/items.cc | 21 |
2 files changed, 12 insertions, 19 deletions
diff --git a/crawl-ref/docs/options_guide.txt b/crawl-ref/docs/options_guide.txt index 470f742f25..0d0c04663d 100644 --- a/crawl-ref/docs/options_guide.txt +++ b/crawl-ref/docs/options_guide.txt @@ -1582,8 +1582,8 @@ The following events are logged: - Being put under penance and being forgiven - Receiving a gift from a god (except Xom) - Being able to invoke a godly power for the first time - - Picking up a rune or the orb of zot for the first time - - Identifying items, or picking them up for the first time (see below) + - Picking up a rune, the Orb of Zot, or an artefact for the first time. + - Identifying items. - Killing OOD or unique monsters (see below) - Reaching critical HP levels (see below) - Gaining or losing mutations @@ -1596,14 +1596,14 @@ user_note_prefix = <string> them easier to find. note_items = <regexes> - When an item is identified or picked up for the first time, it will - be noted if its short description matches a regex. E.g. + When an item is identified for the first time, it will be + noted if its short description matches a regex. E.g. note_items = rod,book,acquirement Artefacts (fixed, unrand, or random) will always be noted when identified, regardless of note_items. The description matched against has the same prefixes as notes - for the menu_colour option (e.g., "identified", "know", etc). + for the menu_colour option (e.g., "emergency_item"). note_monsters = <regex list> Monsters whose name matches an item in this comma-separated list diff --git a/crawl-ref/source/items.cc b/crawl-ref/source/items.cc index 5e5eba7580..613c2dee8e 100644 --- a/crawl-ref/source/items.cc +++ b/crawl-ref/source/items.cc @@ -967,7 +967,11 @@ static void _milestone_check(const item_def &item) static void _check_note_item(item_def &item) { - if (!(item.flags & ISFLAG_NOTED_GET) && is_interesting_item(item)) + if (item.flags & (ISFLAG_NOTED_GET | ISFLAG_NOTED_ID)) + return; + + if (is_rune(item) || item.base_type == OBJ_ORBS + || is_artefact(item)) { take_note(Note(NOTE_GET_ITEM, 0, 0, item.name(DESC_NOCAP_A).c_str(), origin_desc(item).c_str())); @@ -1457,13 +1461,7 @@ static void _got_item(item_def& item, int quant) } item.flags |= ISFLAG_BEEN_IN_INV; - if (!(item.flags & ISFLAG_NOTED_GET)) - { - take_note(Note(NOTE_GET_ITEM, 0, 0, - item.name(DESC_NOCAP_A).c_str())); - // Don't take another note. - item.flags |= (ISFLAG_NOTED_ID | ISFLAG_NOTED_GET); - } + _check_note_item(item); } // Returns quantity of items moved into player's inventory and -1 if @@ -1626,12 +1624,7 @@ int move_item_to_player( int obj, int quant_got, bool quiet ) && you.char_direction == GDT_DESCENDING) { // Take a note! - if (!(item.flags & ISFLAG_NOTED_GET)) - { - take_note(Note(NOTE_GET_ITEM, 0, 0, - item.name(DESC_NOCAP_A).c_str())); - item.flags |= (ISFLAG_NOTED_ID | ISFLAG_NOTED_GET); - } + _check_note_item(item); if (!quiet) mpr("Now all you have to do is get back out of the dungeon!"); |