MCPcopy Create free account
hub / github.com/crawl/crawl / _check_note_item

Function _check_note_item

crawl-ref/source/items.cc:1186–1204  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1184}
1185
1186static void _check_note_item(item_def &item)
1187{
1188 if (item.flags & (ISFLAG_NOTED_GET | ISFLAG_NOTED_ID))
1189 return;
1190
1191 if (item_is_collectible(item) || is_artefact(item))
1192 {
1193 int v = item.base_type == OBJ_GEMS ? gem_time_left(item.sub_type) : 0;
1194 take_note(Note(NOTE_GET_ITEM, v, 0, item.name(DESC_A),
1195 origin_desc(item)));
1196 item.flags |= ISFLAG_NOTED_GET;
1197
1198 // If it's already fully identified when picked up, don't take
1199 // further notes.
1200 if (item.is_identified())
1201 item.flags |= ISFLAG_NOTED_ID;
1202 milestone_check(item);
1203 }
1204}
1205
1206void origin_set(const coord_def& where)
1207{

Callers 3

_origin_freezeFunction · 0.85
note_inscribe_itemFunction · 0.85
_put_item_in_invFunction · 0.85

Calls 9

item_is_collectibleFunction · 0.85
is_artefactFunction · 0.85
gem_time_leftFunction · 0.85
take_noteFunction · 0.85
NoteClass · 0.85
origin_descFunction · 0.85
milestone_checkFunction · 0.85
is_identifiedMethod · 0.80
nameMethod · 0.45

Tested by

no test coverage detected