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

Method defined

crawl-ref/source/items.cc:3732–3735  ·  view source on GitHub ↗

Note: This function is to isolate all the checks to see if an item is valid (often just checking the quantity). It shouldn't be used a a substitute for those cases which actually want to check the quantity (as the rules for unused objects might change).

Source from the content-addressed store, hash-verified

3730// which actually want to check the quantity (as the
3731// rules for unused objects might change).
3732bool item_def::defined() const
3733{
3734 return base_type != OBJ_UNASSIGNED && quantity > 0;
3735}
3736/**
3737 * Has this item's appearance been initialized?
3738 */

Callers 15

_autoswitch_to_meleeFunction · 0.45
reclaim_decks_on_levelFunction · 0.45
_reclaim_inventory_decksFunction · 0.45
_check_inventory_skillsFunction · 0.45
examine_indexMethod · 0.45
_get_inv_items_to_showFunction · 0.45
any_items_of_typeFunction · 0.45
prompt_invent_itemFunction · 0.45
identify_inventoryFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected