| 297 | } |
| 298 | |
| 299 | static void parse_product( |
| 300 | color_ostream &out, ProductInfo &info, df::reaction *react, improvement_product *prod |
| 301 | ) { |
| 302 | using namespace df::enums::reaction_product_improvement_flags; |
| 303 | |
| 304 | info.react = react; |
| 305 | info.product = prod; |
| 306 | |
| 307 | find_reagent(out, info.object, react, prod->target_reagent); |
| 308 | |
| 309 | auto ritem = strict_virtual_cast<df::reaction_reagent_itemst>(info.object.reagent); |
| 310 | if (ritem) |
| 311 | ritem->flags1.bits.improvable = true; |
| 312 | |
| 313 | info.material.mat_type = prod->mat_type; |
| 314 | info.material.mat_index = prod->mat_index; |
| 315 | |
| 316 | if (prod->flags.is_set(GET_MATERIAL_PRODUCT)) |
| 317 | { |
| 318 | find_reagent(out, info.material, react, prod->get_material.reagent_code); |
| 319 | |
| 320 | info.material.product = true; |
| 321 | info.material.product_name = prod->get_material.product_code; |
| 322 | } |
| 323 | else if (prod->flags.is_set(GET_MATERIAL_SAME)) |
| 324 | { |
| 325 | find_reagent(out, info.material, react, prod->get_material.reagent_code); |
| 326 | } |
| 327 | } |
| 328 | |
| 329 | static bool find_reactions(color_ostream &out) |
| 330 | { |
no test coverage detected