| 169 | } |
| 170 | |
| 171 | void DFHack::Job::printItemDetails(color_ostream &out, df::job_item *item, int idx) |
| 172 | { |
| 173 | using std::endl; |
| 174 | |
| 175 | CHECK_NULL_POINTER(item); |
| 176 | |
| 177 | ItemTypeInfo info(item); |
| 178 | out << " Input Item " << (idx+1) << ": " << info.toString(); |
| 179 | |
| 180 | if (item->quantity != 1) |
| 181 | out << "; quantity=" << item->quantity; |
| 182 | if (item->min_dimension >= 0) |
| 183 | out << "; min_dimension=" << item->min_dimension; |
| 184 | out << endl; |
| 185 | |
| 186 | MaterialInfo mat(item); |
| 187 | if (mat.isValid() || item->metal_ore >= 0) { |
| 188 | out << " material: " << mat.toString(); |
| 189 | if (item->metal_ore >= 0) |
| 190 | out << "; ore of " << MaterialInfo(0,item->metal_ore).toString(); |
| 191 | out << endl; |
| 192 | } |
| 193 | |
| 194 | if (item->flags1.whole) |
| 195 | out << " flags1: " << bitfield_to_string(item->flags1) << endl; |
| 196 | if (item->flags2.whole) |
| 197 | out << " flags2: " << bitfield_to_string(item->flags2) << endl; |
| 198 | if (item->flags3.whole) |
| 199 | out << " flags3: " << bitfield_to_string(item->flags3) << endl; |
| 200 | |
| 201 | if (!item->reaction_class.empty()) |
| 202 | out << " reaction class: " << item->reaction_class << endl; |
| 203 | if (!item->has_material_reaction_product.empty()) |
| 204 | out << " reaction product: " << item->has_material_reaction_product << endl; |
| 205 | if (item->has_tool_use >= (df::tool_uses)0) |
| 206 | out << " tool use: " << ENUM_KEY_STR(tool_uses, item->has_tool_use) << endl; |
| 207 | } |
| 208 | |
| 209 | template <typename T> |
| 210 | static void print_bitfield(color_ostream &out, T jsf) { |
nothing calls this directly
no test coverage detected