MCPcopy Create free account
hub / github.com/DFHack/dfhack / scan_item

Function scan_item

plugins/fix-occupancy.cpp:144–152  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

142}
143
144static void scan_item(df::item * item, Expected & expected) {
145 if (!item->flags.bits.on_ground)
146 return;
147 auto pos = Items::getPosition(item);
148 if (auto block_items = expected.block_items(pos))
149 block_items->emplace(item->id);
150 if (auto expected_occ = expected.occ(pos))
151 expected_occ->bits.item = true;
152}
153
154static void normalize_item_vector(color_ostream &out, df::map_block *block, bool dry_run) {
155 bool needs_sorting = false;

Callers 2

fix_tileFunction · 0.70
fix_mapFunction · 0.70

Calls 2

block_itemsMethod · 0.80
occMethod · 0.80

Tested by

no test coverage detected