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

Method order_dye_from_reaction

plugins/tailor.cpp:564–580  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

562 };
563
564 oqt order_dye_from_reaction(df::reaction* r, int c = 1)
565 {
566 std::string descr;
567 auto dye = std::ranges::find_if(r->products, product_is_dye);
568 assert(dye != r->products.end());
569 auto pp = virtual_cast<df::reaction_product_itemst>(*dye);
570 assert(pp != nullptr);
571
572 pp->getDescription(&descr);
573
574 auto [_, n] = get_or_create_order(c, df::job_type::CustomReaction, -1, -1, 0, r->code);
575 if (n > 0)
576 {
577 INFO(cycle).print("tailor: ordered {} {}\n", c, DF2CONSOLE(descr));
578 }
579 return n;
580 }
581
582 oqt order_dye_cloth(int c = 1)
583 {

Callers

nothing calls this directly

Calls 3

endMethod · 0.45
getDescriptionMethod · 0.45
printMethod · 0.45

Tested by

no test coverage detected