| 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 | { |