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

Function get_desc_string

plugins/buildingplan/buildingplan.cpp:507–519  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

505}
506
507static string get_desc_string(color_ostream &out, df::job_item *jitem,
508 const vector<df::job_item_vector_id> &vec_ids) {
509 vector<string> descs;
510 for (auto &vec_id : vec_ids) {
511 df::job_item jitem_copy = *jitem;
512 jitem_copy.vector_id = vec_id;
513 Lua::CallLuaModuleFunction(out, "plugins.buildingplan", "get_desc", std::make_tuple(&jitem_copy),
514 1, [&](lua_State *L) {
515 descs.emplace_back(lua_tostring(L, -1));
516 });
517 }
518 return join_strings(" or ", descs);
519}
520
521static void printStatus(color_ostream &out) {
522 DEBUG(control,out).print("entering buildingplan_printStatus\n");

Callers 2

printStatusFunction · 0.85
getDescStringFunction · 0.85

Calls 2

CallLuaModuleFunctionFunction · 0.85
join_stringsFunction · 0.50

Tested by

no test coverage detected