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

Method isSuitableMaterial

library/modules/Job.cpp:652–664  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

650}
651
652bool Job::isSuitableMaterial(
653 const df::job_item *jitem, int mat_type, int mat_index, df::item_type itype)
654{
655 CHECK_NULL_POINTER(jitem);
656
657 if (mat_type == -1 && mat_index == -1)
658 return true;
659
660 ItemTypeInfo iinfo(jitem);
661 MaterialInfo minfo(mat_type, mat_index);
662
663 return minfo.isValid() && iinfo.matches(*jitem, &minfo, false, itype);
664}
665
666std::string Job::getName(df::job *job)
667{

Callers

nothing calls this directly

Calls 2

isValidMethod · 0.45
matchesMethod · 0.45

Tested by

no test coverage detected