| 217 | } |
| 218 | |
| 219 | static command_result job_material(color_ostream &out, vector <string> & parameters) |
| 220 | { |
| 221 | MaterialInfo new_mat; |
| 222 | if (parameters.size() == 1) |
| 223 | { |
| 224 | if (!new_mat.find(parameters[0])) { |
| 225 | out.printerr("Could not find material: {}\n", parameters[0]); |
| 226 | return CR_WRONG_USAGE; |
| 227 | } |
| 228 | } |
| 229 | else |
| 230 | return CR_WRONG_USAGE; |
| 231 | |
| 232 | if (plotinfo->main.mode == ui_sidebar_mode::QueryBuilding) |
| 233 | return job_material_in_job(out, new_mat); |
| 234 | if (plotinfo->main.mode == ui_sidebar_mode::Build) |
| 235 | return job_material_in_build(out, new_mat); |
| 236 | |
| 237 | return CR_WRONG_USAGE; |
| 238 | } |
| 239 | |
| 240 | /* job-duplicate implementation */ |
| 241 |
nothing calls this directly
no test coverage detected