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

Method toString

library/modules/Items.cpp:161–179  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

159}
160
161string ItemTypeInfo::toString()
162{ using namespace df::enums::item_type;
163 switch (type)
164 {
165#define ITEM(type,vec,tclass) \
166 case type: \
167 if (VIRTUAL_CAST_VAR(cv, df::tclass, custom)) \
168 return cv->name;
169ITEMDEF_VECTORS
170#undef ITEM
171
172 default:
173 break;
174 }
175
176 if (const char *name = ENUM_ATTR(item_type, caption, type))
177 return name;
178 return toLower_cp437(ENUM_KEY_STR(item_type, type));
179}
180
181bool ItemTypeInfo::find(const string &token)
182{ using namespace df::enums::item_type;

Callers 15

dfhack_matinfo_toStringFunction · 0.45
hotkey_pushBindArrayFunction · 0.45
get_item_type_strFunction · 0.45
printItemDetailsMethod · 0.45
printJobDetailsMethod · 0.45
df_showmoodFunction · 0.45
shortJobDescriptionFunction · 0.45
df_probeFunction · 0.45
job_material_in_jobFunction · 0.45
job_material_in_buildFunction · 0.45
create_bouldersFunction · 0.45

Calls 1

toLower_cp437Function · 0.85

Tested by

no test coverage detected