| 650 | } |
| 651 | |
| 652 | bool 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 | |
| 666 | std::string Job::getName(df::job *job) |
| 667 | { |