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

Method product_is_dye

plugins/tailor.cpp:553–562  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

551 using color_type = decltype(MaterialInfo::material->powder_dye);
552
553 static auto product_is_dye (df::reaction_product* r) -> bool
554 {
555 if (r->getType() == df::reaction_product_type::item)
556 {
557 auto rr = virtual_cast<df::reaction_product_itemst> (r);
558 auto mat = MaterialInfo(rr->mat_type, rr->mat_index);
559 return mat.material && mat.material->flags.is_set(df::enums::material_flags::IS_DYE);
560 }
561 return false;
562 };
563
564 oqt order_dye_from_reaction(df::reaction* r, int c = 1)
565 {

Callers

nothing calls this directly

Calls 3

getTypeMethod · 0.80
is_setMethod · 0.80
MaterialInfoClass · 0.50

Tested by

no test coverage detected