Sigoles
Discord: @sigoles
- Joined
- Nov 20, 2015
- Messages
- 1,209
- Solutions
- 2
- Reaction score
- 154
Some script onStartup to check what id and positions of these items without names, (item type)..
tfs 1.2
thanks
tfs 1.2
thanks
C++:
std::string Item::getNameDescription(const ItemType& it, const Item* item /*= nullptr*/, int32_t subType /*= -1*/, bool addArticle /*= true*/)
{
if (item) {
subType = item->getSubType();
}
std::ostringstream s;
const std::string& name = (item ? item->getName() : it.name);
if (!name.empty()) {
if (it.stackable && subType > 1) {
if (it.showCount) {
s << subType << ' ';
}
s << (item ? item->getPluralName() : it.getPluralName());
} else {
if (addArticle) {
const std::string& article = (item ? item->getArticle() : it.article);
if (!article.empty()) {
s << article << ' ';
}
}
s << name;
}
} else {
s << "an item of type " << it.id;
}
return s.str();
}