| 220 | } |
| 221 | |
| 222 | bool ItemTypeInfo::matches(df::job_item_vector_id vec_id) { |
| 223 | auto other_id = ENUM_ATTR(job_item_vector_id, other, vec_id); |
| 224 | |
| 225 | auto explicit_item = ENUM_ATTR(items_other_id, item, other_id); |
| 226 | if (explicit_item != item_type::NONE && type != explicit_item) |
| 227 | return false; |
| 228 | |
| 229 | auto generic_item = ENUM_ATTR(items_other_id, generic_item, other_id); |
| 230 | if (generic_item.size > 0) { |
| 231 | for (size_t i = 0; i < generic_item.size; i++) |
| 232 | if (generic_item.items[i] == type) |
| 233 | return true; |
| 234 | return false; |
| 235 | } |
| 236 | return true; |
| 237 | } |
| 238 | |
| 239 | bool ItemTypeInfo::matches(const df::job_item &jitem, MaterialInfo *mat, |
| 240 | bool skip_vector, df::item_type itype) |
no test coverage detected