* 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. */
| 293 | * @return Full name. |
| 294 | */ |
| 295 | std::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. |