1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-23 22:37:55 +02:00

resource translation

This commit is contained in:
Laserlicht
2025-09-14 16:17:55 +02:00
parent 75f965c93a
commit 40062d7755
10 changed files with 54 additions and 29 deletions

View File

@@ -14,6 +14,7 @@
#include "entities/artifact/CArtifact.h"
#include "entities/faction/CFaction.h"
#include "entities/hero/CHero.h"
#include "entities/ResourceTypeHandler.h"
#include "texts/CGeneralTextHandler.h"
#include "CSkillHandler.h"
#include "GameConstants.h"
@@ -378,7 +379,7 @@ void MetaString::appendName(const CreatureID & id, TQuantity count)
void MetaString::appendName(const GameResID& id)
{
appendTextID(TextIdentifier("core.restypes", id.getNum()).get());
appendTextID(LIBRARY->resourceTypeHandler->getById(id)->getNameTextID());
}
void MetaString::appendNameSingular(const CreatureID & id)
@@ -423,7 +424,7 @@ void MetaString::replaceName(const SpellID & id)
void MetaString::replaceName(const GameResID& id)
{
replaceTextID(TextIdentifier("core.restypes", id.getNum()).get());
replaceTextID(LIBRARY->resourceTypeHandler->getById(id)->getNameTextID());
}
void MetaString::replaceNameSingular(const CreatureID & id)