1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-27 22:49:25 +02:00

introduce toResourceType

This commit is contained in:
Laserlicht
2025-09-15 00:08:18 +02:00
parent acd067e587
commit d808bd6412
34 changed files with 160 additions and 102 deletions

View File

@@ -379,7 +379,7 @@ void MetaString::appendName(const CreatureID & id, TQuantity count)
void MetaString::appendName(const GameResID& id)
{
appendTextID(LIBRARY->resourceTypeHandler->getById(id)->getNameTextID());
appendTextID(id.toResource()->getNameTextID());
}
void MetaString::appendNameSingular(const CreatureID & id)
@@ -424,7 +424,7 @@ void MetaString::replaceName(const SpellID & id)
void MetaString::replaceName(const GameResID& id)
{
replaceTextID(LIBRARY->resourceTypeHandler->getById(id)->getNameTextID());
replaceTextID(id.toResource()->getNameTextID());
}
void MetaString::replaceNameSingular(const CreatureID & id)