mirror of
https://github.com/vcmi/vcmi.git
synced 2025-07-05 00:49:09 +02:00
Merge pull request #5143 from IvanSavenko/junkman_fix
Remove MetaString method that can't be used with modded objects
This commit is contained in:
@ -217,7 +217,7 @@ void CGDwelling::onHeroVisit( const CGHeroInstance * h ) const
|
||||
iw.type = EInfoWindowMode::AUTO;
|
||||
iw.player = h->tempOwner;
|
||||
iw.text.appendLocalString(EMetaText::ADVOB_TXT, 44); //{%s} \n\n The camp is deserted. Perhaps you should try next week.
|
||||
iw.text.replaceName(ID);
|
||||
iw.text.replaceName(ID, subID);
|
||||
cb->sendAndApply(iw);
|
||||
return;
|
||||
}
|
||||
@ -260,7 +260,7 @@ void CGDwelling::onHeroVisit( const CGHeroInstance * h ) const
|
||||
else if(ID == Obj::REFUGEE_CAMP)
|
||||
{
|
||||
bd.text.appendLocalString(EMetaText::ADVOB_TXT, 35); //{%s} Would you like to recruit %s?
|
||||
bd.text.replaceName(ID);
|
||||
bd.text.replaceName(ID, subID);
|
||||
for(const auto & elem : creatures)
|
||||
bd.text.replaceNamePlural(elem.second[0]);
|
||||
}
|
||||
|
@ -45,7 +45,7 @@ std::string CGMarket::getPopupText(PlayerColor player) const
|
||||
return getHoverText(player);
|
||||
|
||||
MetaString message = MetaString::createFromRawString("{%s}\r\n\r\n%s");
|
||||
message.replaceName(ID);
|
||||
message.replaceName(ID, subID);
|
||||
message.replaceTextID(TextIdentifier(getObjectHandler()->getBaseTextID(), "description").get());
|
||||
return message.toString();
|
||||
}
|
||||
|
Reference in New Issue
Block a user