| 637 | } |
| 638 | |
| 639 | bool 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 | |
| 652 | bool Job::isSuitableMaterial( |
| 653 | const df::job_item *jitem, int mat_type, int mat_index, df::item_type itype) |