| 73 | } |
| 74 | |
| 75 | static void find_material(int *type, int *index, df::item *input, MaterialSource &mat) |
| 76 | { |
| 77 | if (input && mat.reagent) |
| 78 | { |
| 79 | MaterialInfo info(input); |
| 80 | |
| 81 | if (mat.product) |
| 82 | { |
| 83 | if (!info.findProduct(info, mat.product_name)) |
| 84 | { |
| 85 | color_ostream_proxy out(Core::getInstance().getConsole()); |
| 86 | out.printerr("Cannot find product '{}'\n", mat.product_name); |
| 87 | } |
| 88 | } |
| 89 | |
| 90 | *type = info.type; |
| 91 | *index = info.index; |
| 92 | } |
| 93 | else |
| 94 | { |
| 95 | *type = mat.mat_type; |
| 96 | *index = mat.mat_index; |
| 97 | } |
| 98 | } |
| 99 | |
| 100 | static int has_contaminant(df::item_actual *item, int type, int index) |
| 101 | { |
no test coverage detected