1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-24 22:14:36 +02:00

Fix error messages in log on map start

This commit is contained in:
Ivan Savenko 2023-11-26 18:53:34 +02:00
parent 6730ec64d5
commit 2c8d0338ba
4 changed files with 14 additions and 3 deletions

View File

@ -51,8 +51,11 @@ void MetaString::appendRawString(const std::string & value)
void MetaString::appendTextID(const std::string & value)
{
message.push_back(EMessage::APPEND_TEXTID_STRING);
stringsTextID.push_back(value);
if (!value.empty())
{
message.push_back(EMessage::APPEND_TEXTID_STRING);
stringsTextID.push_back(value);
}
}
void MetaString::appendNumber(int64_t value)

View File

@ -947,6 +947,11 @@ std::string CGTownInstance::getNameTranslated() const
return VLC->generaltexth->translate(nameTextId);
}
std::string CGTownInstance::getNameTextID() const
{
return nameTextId;
}
void CGTownInstance::setNameTextId( const std::string & newName )
{
nameTextId = newName;

View File

@ -137,6 +137,7 @@ public:
const CArmedInstance *getUpperArmy() const; //garrisoned hero if present or the town itself
std::string getNameTranslated() const;
std::string getNameTextID() const;
void setNameTextId(const std::string & newName);
//////////////////////////////////////////////////////////////////////////

View File

@ -45,7 +45,9 @@ public:
std::string heroName; //backup of hero name
HeroTypeID heroPortrait;
MetaString firstVisitText, nextVisitText, completedText;
MetaString firstVisitText;
MetaString nextVisitText;
MetaString completedText;
bool isCustomFirst;
bool isCustomNext;
bool isCustomComplete;