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

Function getDescString

plugins/buildingplan/buildingplan.cpp:1133–1144  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1131}
1132
1133static string getDescString(color_ostream &out, df::building *bld, int index) {
1134 DEBUG(control,out).print("entering getDescString\n");
1135 if (!validate_pb(out, bld, index))
1136 return "INVALID";
1137
1138 PlannedBuilding &pb = planned_buildings.at(bld->id);
1139 auto & jitems = bld->jobs[0]->job_items.elements;
1140 const size_t num_job_items = jitems.size();
1141 int rev_index = num_job_items - (index + 1);
1142 auto &jitem = jitems[rev_index];
1143 return int_to_string(jitem->quantity) + " " + get_desc_string(out, jitem, pb.vector_ids[index]);
1144}
1145
1146static int getQueuePosition(color_ostream &out, df::building *bld, int index) {
1147 TRACE(control,out).print("entering getQueuePosition\n");

Callers

nothing calls this directly

Calls 5

validate_pbFunction · 0.85
int_to_stringFunction · 0.85
get_desc_stringFunction · 0.85
printMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected