| 1535 | ******************************/ |
| 1536 | |
| 1537 | static std::string shortJobDescription(df::job *job) |
| 1538 | { |
| 1539 | std::string rv = stl_sprintf("job %d: ", job->id); |
| 1540 | |
| 1541 | if (job->job_type != job_type::CustomReaction) |
| 1542 | rv += ENUM_KEY_STR(job_type, job->job_type); |
| 1543 | else |
| 1544 | rv += job->reaction_name; |
| 1545 | |
| 1546 | MaterialInfo mat; |
| 1547 | df::dfhack_material_category mat_mask; |
| 1548 | guess_job_material(job, mat, mat_mask); |
| 1549 | |
| 1550 | if (mat.isValid()) |
| 1551 | rv += " [" + mat.toString() + "]"; |
| 1552 | else if (mat_mask.whole) |
| 1553 | rv += " [" + bitfield_to_string(mat_mask) + "]"; |
| 1554 | |
| 1555 | return rv; |
| 1556 | } |
| 1557 | |
| 1558 | static void print_constraint(color_ostream &out, ItemConstraint *cv, bool no_job = false, std::string prefix = "") |
| 1559 | { |
no test coverage detected