mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-23 22:37:55 +02:00
resource translation
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user