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

Function find_item

plugins/add-spatter.cpp:156–163  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

154}
155
156df::item* find_item(ReagentSource &info, item_table &table)
157{
158 if (!info.reagent)
159 return NULL;
160 if (table[info.idx].empty())
161 return NULL;
162 return table[info.idx].back();
163}
164
165struct item_hook : df::item_constructed {
166 typedef df::item_constructed interpose_base;

Callers 2

Calls 2

emptyMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected