1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-29 23:07:48 +02:00

Renamed MetaString methods to more logical names

This commit is contained in:
Ivan Savenko
2023-06-18 12:18:25 +03:00
parent 2636a0dcc3
commit 56d69e790b
32 changed files with 592 additions and 557 deletions

View File

@@ -34,9 +34,9 @@ namespace {
{
MetaString ret;
if (value.isNumber())
ret.addTxt(MetaString::ADVOB_TXT, static_cast<ui32>(value.Float()));
ret.appendLocalString(EMetaText::ADVOB_TXT, static_cast<ui32>(value.Float()));
else
ret.addRawString(value.String());
ret.appendRawString(value.String());
return ret;
}
@@ -191,10 +191,10 @@ void Rewardable::Info::configureRewards(
info.message = loadMessage(reward["message"]);
for (const auto & artifact : info.reward.artifacts )
info.message.addReplacement(MetaString::ART_NAMES, artifact.getNum());
info.message.replaceLocalString(EMetaText::ART_NAMES, artifact.getNum());
for (const auto & artifact : info.reward.spells )
info.message.addReplacement(MetaString::SPELL_NAME, artifact.getNum());
info.message.replaceLocalString(EMetaText::SPELL_NAME, artifact.getNum());
object.info.push_back(info);
}