MCPcopy Create free account
hub / github.com/DFHack/dfhack / job_material

Function job_material

plugins/jobutils.cpp:219–238  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

217}
218
219static 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

Callers

nothing calls this directly

Calls 4

job_material_in_jobFunction · 0.85
job_material_in_buildFunction · 0.85
sizeMethod · 0.45
findMethod · 0.45

Tested by

no test coverage detected