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

Method isSuitableItem

library/modules/Job.cpp:639–650  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

637}
638
639bool Job::isSuitableItem(const df::job_item *jitem, df::item_type itype, int isubtype)
640{
641 CHECK_NULL_POINTER(jitem);
642
643 if (itype == item_type::NONE)
644 return true;
645
646 ItemTypeInfo iinfo(itype, isubtype);
647 MaterialInfo minfo(jitem);
648
649 return iinfo.isValid() && iinfo.matches(*jitem, &minfo, false, itype);
650}
651
652bool Job::isSuitableMaterial(
653 const df::job_item *jitem, int mat_type, int mat_index, df::item_type itype)

Callers

nothing calls this directly

Calls 2

isValidMethod · 0.45
matchesMethod · 0.45

Tested by

no test coverage detected