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

Method count_dye_cloth_orders

plugins/tailor.cpp:609–621  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

607 }
608
609 int count_dye_cloth_orders()
610 {
611 auto f = [] (df::manager_order* o) {
612 return o->job_type == df::job_type::DyeCloth;
613 };
614
615 int sum = 0;
616 for (auto o : std::ranges::views::filter(world->manager_orders.all, f))
617 {
618 sum += o->amount_left;
619 }
620 return sum;
621 }
622
623 static std::pair<df::manager_order*,oqt> get_or_create_order(oqt c, df::job_type ty, int16_t sub, int32_t hfid, df::job_material_category mcat, std::string custom_reaction = "")
624 {

Callers

nothing calls this directly

Calls 1

filterFunction · 0.85

Tested by

no test coverage detected