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

Function isJobReady

plugins/buildingplan/buildingplan_cycle.cpp:191–199  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

189}
190
191bool isJobReady(color_ostream &out, const std::vector<df::job_item *> &jitems) {
192 int needed_items = 0;
193 for (auto job_item : jitems) { needed_items += job_item->quantity; }
194 if (needed_items) {
195 DEBUG(cycle,out).print("building needs {} more item(s)\n", needed_items);
196 return false;
197 }
198 return true;
199}
200
201static bool job_item_idx_lt(df::job_item_ref *a, df::job_item_ref *b) {
202 // we want the items in the opposite order of the filters

Callers 2

registerPlannedBuildingFunction · 0.85
doVectorFunction · 0.85

Calls 1

printMethod · 0.45

Tested by

no test coverage detected