MCPcopy Create free account
hub / github.com/OpenXcom/OpenXcom / getName

Method getName

src/Savegame/Craft.cpp:295–299  ·  view source on GitHub ↗

* Returns the craft's unique identifying name. * If there's no custom name, the language default is used. * @param lang Language to get strings from. * @return Full name. */

Source from the content-addressed store, hash-verified

293 * @return Full name.
294 */
295std::wstring Craft::getName(Language *lang) const
296{
297 if (_name.empty()) return lang->getString("STR_CRAFTNAME").arg(lang->getString(_rules->getType())).arg(_id);
298 return _name;
299}
300
301/**
302 * Changes the craft's custom name.

Callers

nothing calls this directly

Calls 4

argMethod · 0.60
emptyMethod · 0.45
getStringMethod · 0.45
getTypeMethod · 0.45

Tested by

no test coverage detected